Fix issue with colours in the new lazy-loaded preference panels.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14784

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14782

(cherry picked from commit d4c9d9d60a)
(cherry picked from commit c33b3fd314)
This commit is contained in:
Jeff Young 2023-05-21 10:54:48 +01:00 committed by Seth Hillbrand
parent 97ffb60f23
commit 8b114c81c5
2 changed files with 8 additions and 0 deletions

View File

@ -58,6 +58,12 @@ public:
if( show )
Resolve();
// m_contents has been created as a child window of LAZY_PAGE, and has been added to
// LAZY_PAGE's m_mainSizer. So wxPanel::Show() should call m_contents' Show() method,
// whether overridden or not. Only it doesn't, so we call it directly here.
if( show && m_contents )
m_contents->Show( true );
return wxPanel::Show( show );
}

View File

@ -68,9 +68,11 @@ void PANEL_EESCHEMA_EDITING_OPTIONS::loadEEschemaSettings( EESCHEMA_SETTINGS* aC
COLOR4D schematicBackground = settings->GetColor( LAYER_SCHEMATIC_BACKGROUND );
m_borderColorSwatch->SetSwatchBackground( schematicBackground );
m_borderColorSwatch->SetDefaultColor( settings->GetDefaultColor( LAYER_SHEET ) );
m_borderColorSwatch->SetSwatchColor( aCfg->m_Drawing.default_sheet_border_color, false );
m_backgroundColorSwatch->SetSwatchBackground( schematicBackground );
m_backgroundColorSwatch->SetDefaultColor( settings->GetDefaultColor( LAYER_SHEET_BACKGROUND ) );
m_backgroundColorSwatch->SetSwatchColor( aCfg->m_Drawing.default_sheet_background_color, false );
m_choiceLineMode->SetSelection( aCfg->m_Drawing.line_mode );