diff --git a/pcbnew/dialogs/panel_setup_layers.cpp b/pcbnew/dialogs/panel_setup_layers.cpp index 6b7d3a52c4..2c7756557a 100644 --- a/pcbnew/dialogs/panel_setup_layers.cpp +++ b/pcbnew/dialogs/panel_setup_layers.cpp @@ -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( 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; -} \ No newline at end of file +} diff --git a/pcbnew/dialogs/panel_setup_layers.h b/pcbnew/dialogs/panel_setup_layers.h index 25ca9c6b3e..ad84fedf0e 100644 --- a/pcbnew/dialogs/panel_setup_layers.h +++ b/pcbnew/dialogs/panel_setup_layers.h @@ -61,6 +61,7 @@ public: private: PAGED_DIALOG* m_Parent; + PCB_EDIT_FRAME* m_frame; BOARD* m_pcb; LSET m_enabledLayers;