From 3380617836b8f473e74fb47acca8071774785560 Mon Sep 17 00:00:00 2001 From: Zoltan Gyarmati Date: Sun, 31 Jan 2021 15:28:37 +0000 Subject: [PATCH] Axis color fixes in symbol editor - explicitly set axis color at symbol editor start - force redraw of grid after axis color change Fixes: https://gitlab.com/kicad/code/kicad/issues/7160 --- eeschema/symbol_editor/symbol_edit_frame.cpp | 2 ++ eeschema/symbol_viewer_frame.cpp | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/eeschema/symbol_editor/symbol_edit_frame.cpp b/eeschema/symbol_editor/symbol_edit_frame.cpp index 76b308c9f6..536a78f739 100644 --- a/eeschema/symbol_editor/symbol_edit_frame.cpp +++ b/eeschema/symbol_editor/symbol_edit_frame.cpp @@ -134,6 +134,7 @@ SYMBOL_EDIT_FRAME::SYMBOL_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) : GetCanvas()->GetViewControls()->SetCrossHairCursorPosition( VECTOR2D( 0, 0 ), false ); GetRenderSettings()->LoadColors( GetColorSettings() ); + GetCanvas()->GetGAL()->SetAxesColor( m_colorSettings->GetColor( LAYER_SCHEMATIC_GRID_AXES ) ); setupTools(); setupUIConditions(); @@ -1068,6 +1069,7 @@ void SYMBOL_EDIT_FRAME::CommonSettingsChanged( bool aEnvVarsChanged, bool aTextV SCH_BASE_FRAME::CommonSettingsChanged( aEnvVarsChanged, aTextVarsChanged ); GetCanvas()->GetGAL()->SetAxesColor( m_colorSettings->GetColor( LAYER_SCHEMATIC_GRID_AXES ) ); + GetCanvas()->GetGAL()->DrawGrid(); RecreateToolbars(); diff --git a/eeschema/symbol_viewer_frame.cpp b/eeschema/symbol_viewer_frame.cpp index bd0621b057..c40c336903 100644 --- a/eeschema/symbol_viewer_frame.cpp +++ b/eeschema/symbol_viewer_frame.cpp @@ -136,6 +136,9 @@ SYMBOL_VIEWER_FRAME::SYMBOL_VIEWER_FRAME( KIWAY* aKiway, wxWindow* aParent, FRAM gal_opts.m_axesEnabled = true; GetCanvas()->GetGAL()->SetAxesEnabled( true ); + GetRenderSettings()->LoadColors( GetColorSettings() ); + GetCanvas()->GetGAL()->SetAxesColor( m_colorSettings->GetColor( LAYER_SCHEMATIC_GRID_AXES ) ); + GetRenderSettings()->m_ShowHiddenText = true; GetRenderSettings()->m_ShowHiddenPins = true; GetRenderSettings()->SetDefaultPenWidth( DEFAULT_LINE_THICKNESS * IU_PER_MILS ); @@ -724,6 +727,9 @@ void SYMBOL_VIEWER_FRAME::CommonSettingsChanged( bool aEnvVarsChanged, bool aTex { SCH_BASE_FRAME::CommonSettingsChanged( aEnvVarsChanged, aTextVarsChanged ); + GetCanvas()->GetGAL()->SetAxesColor( m_colorSettings->GetColor( LAYER_SCHEMATIC_GRID_AXES ) ); + GetCanvas()->GetGAL()->DrawGrid(); + if( aEnvVarsChanged ) ReCreateLibList(); }