diff --git a/pcbnew/pcb_draw_panel_gal.cpp b/pcbnew/pcb_draw_panel_gal.cpp index ea3a8d3fad..62a07d3dd8 100644 --- a/pcbnew/pcb_draw_panel_gal.cpp +++ b/pcbnew/pcb_draw_panel_gal.cpp @@ -33,7 +33,7 @@ #include #include #include -#include +#include #include @@ -223,9 +223,8 @@ void PCB_DRAW_PANEL_GAL::DisplayBoard( const BOARD* aBoard ) UseColorScheme( aBoard->GetColorsSettings() ); - // We are expecting here the parent frame is a EDA_DRAW_FRAME or a derived class - // (usually a BASE_PCB_FRAME, PCB_EDIT_FRAME ...) - EDA_DRAW_FRAME* frame = dynamic_cast ( GetParent() ); + PCB_BASE_FRAME* frame = dynamic_cast( GetParent() ); + SetTopLayer( frame->GetActiveLayer() ); if( frame ) {