diff --git a/pcbnew/class_pcb_layer_widget.cpp b/pcbnew/class_pcb_layer_widget.cpp index 731d6051f4..8d5613e0b0 100644 --- a/pcbnew/class_pcb_layer_widget.cpp +++ b/pcbnew/class_pcb_layer_widget.cpp @@ -34,6 +34,7 @@ #ifdef KICAD_GAL #include #include +#include #endif #include #include @@ -342,8 +343,19 @@ bool PCB_LAYER_WIDGET::OnLayerSelect( int aLayer ) // false from this function. myframe->setActiveLayer( aLayer, false ); +#ifdef KICAD_GAL + myframe->GetGalCanvas()->GetView()->GetPainter()->GetSettings()->SetActiveLayer( aLayer ); +#endif /* KICAD_GAL */ + if(DisplayOpt.ContrastModeDisplay) - myframe->GetCanvas()->Refresh(); + { +#ifdef KICAD_GAL + if( myframe->IsGalCanvasActive() ) + myframe->GetGalCanvas()->Refresh(); + else +#endif + myframe->GetCanvas()->Refresh(); + } return true; }