From 2ebacfa3c2e634b551474a809f5a6ff7eb53d8ba Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 18 Jun 2015 17:51:53 +0200 Subject: [PATCH] GAL sets appropriate top layer after loading a PCB. --- pcbnew/pcb_draw_panel_gal.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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 ) {