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
This commit is contained in:
Zoltan Gyarmati 2021-01-31 15:28:37 +00:00 committed by Seth Hillbrand
parent db3b79a046
commit 3380617836
2 changed files with 8 additions and 0 deletions

View File

@ -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();

View File

@ -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();
}