Fixed reference to PCB_EDIT_FRAME in PANEL_SETUP_LAYERS
GetParent() in PANEL_SETUP_LAYERS::TransferDataFromWindow() returns a wxTreebook pointer, instead of expected PCB_EDIT_FRAME resulting in a crash.
This commit is contained in:
parent
009dfa411f
commit
de65ca512f
|
@ -136,14 +136,13 @@ static const LSET presets[] =
|
|||
|
||||
PANEL_SETUP_LAYERS::PANEL_SETUP_LAYERS( PAGED_DIALOG* aParent, PCB_EDIT_FRAME* aFrame ) :
|
||||
PANEL_SETUP_LAYERS_BASE( aParent->GetTreebook() ),
|
||||
m_Parent( aParent ),
|
||||
m_Parent( aParent ), m_frame( aFrame ),
|
||||
m_pcbThickness( aFrame, m_thicknessLabel, m_thicknessCtrl, m_thicknessUnits, true,
|
||||
Millimeter2iu( 0.1 ), Millimeter2iu( 10.0 ) )
|
||||
{
|
||||
m_pcb = aFrame->GetBoard();
|
||||
|
||||
m_LayersListPanel->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_LISTBOX) );
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -590,9 +589,8 @@ bool PANEL_SETUP_LAYERS::TransferDataFromWindow()
|
|||
// because it is likely some tracks and vias where removed
|
||||
if( hasRemovedBoardItems )
|
||||
{
|
||||
PCB_EDIT_FRAME* editFrame = static_cast<PCB_EDIT_FRAME*>( GetParent() );
|
||||
// Rebuild list of nets (full ratsnest rebuild)
|
||||
editFrame->Compile_Ratsnest( NULL, true );
|
||||
m_frame->Compile_Ratsnest( NULL, true );
|
||||
m_pcb->BuildConnectivity();
|
||||
}
|
||||
|
||||
|
@ -765,4 +763,4 @@ void PANEL_SETUP_LAYERS::ImportSettingsFrom( BOARD* aBoard )
|
|||
TransferDataToWindow();
|
||||
|
||||
m_pcb = savedBoard;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -61,6 +61,7 @@ public:
|
|||
|
||||
private:
|
||||
PAGED_DIALOG* m_Parent;
|
||||
PCB_EDIT_FRAME* m_frame;
|
||||
|
||||
BOARD* m_pcb;
|
||||
LSET m_enabledLayers;
|
||||
|
|
Loading…
Reference in New Issue