Don't force grid color to LAYER_GRID in EDA_DRAW_PANEL_GAL
This commit is contained in:
parent
e15acbb00d
commit
b6298a0a41
|
@ -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();
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue