diff --git a/common/draw_panel_gal.cpp b/common/draw_panel_gal.cpp index bcfb0d2b82..2a769ddcd7 100644 --- a/common/draw_panel_gal.cpp +++ b/common/draw_panel_gal.cpp @@ -183,9 +183,6 @@ void EDA_DRAW_PANEL_GAL::onPaint( wxPaintEvent& WXUNUSED( aEvent ) ) m_gal->SetCursorColor( settings->GetLayerColor( LAYER_CURSOR ) ); m_gal->ClearScreen( ); - KIGFX::COLOR4D gridColor = settings->GetLayerColor( LAYER_GRID ); - m_gal->SetGridColor( gridColor ); - if( m_view->IsDirty() ) { m_view->ClearTargets(); diff --git a/pcbnew/class_pcb_layer_widget.cpp b/pcbnew/class_pcb_layer_widget.cpp index 56ff74a5d9..8c39e20a65 100644 --- a/pcbnew/class_pcb_layer_widget.cpp +++ b/pcbnew/class_pcb_layer_widget.cpp @@ -634,6 +634,9 @@ void PCB_LAYER_WIDGET::OnRenderColorChange( int aId, COLOR4D aColor ) if( galCanvas && myframe->IsGalCanvasActive() ) { + if( aId == LAYER_GRID ) + galCanvas->GetGAL()->SetGridColor( aColor ); + KIGFX::VIEW* view = galCanvas->GetView(); view->GetPainter()->GetSettings()->ImportLegacyColors( &myframe->Settings().Colors() ); view->MarkTargetDirty( KIGFX::TARGET_NONCACHED ); // useful to update rastnest diff --git a/pcbnew/pcbframe.cpp b/pcbnew/pcbframe.cpp index 6463a76cd6..8f6a557699 100644 --- a/pcbnew/pcbframe.cpp +++ b/pcbnew/pcbframe.cpp @@ -714,6 +714,12 @@ void PCB_EDIT_FRAME::UseGalCanvas( bool aEnable ) PCB_BASE_EDIT_FRAME::UseGalCanvas( aEnable ); + if( aEnable ) + { + COLORS_DESIGN_SETTINGS& cds = Settings().Colors(); + GetGalCanvas()->GetGAL()->SetGridColor( cds.GetLayerColor( LAYER_GRID ) ); + } + enableGALSpecificMenus(); // Force colors to be legacy-compatible in case they were changed in GAL