Gerbview and Pl_editor: fix missing transfer from preference dialog to Gal options.

Some settings (cursor shape, grid options) were not taken in account after
closing the preferences dialog.
This commit is contained in:
jean-pierre charras 2022-12-29 17:33:41 +01:00
parent 4bb1b4a3d2
commit 157b93c4ae
2 changed files with 7 additions and 0 deletions

View File

@ -1124,6 +1124,10 @@ void GERBVIEW_FRAME::CommonSettingsChanged( bool aEnvVarsChanged, bool aTextVars
{
EDA_DRAW_FRAME::CommonSettingsChanged( aEnvVarsChanged, aTextVarsChanged );
// Update gal display options like cursor shape, grid options:
GERBVIEW_SETTINGS* cfg = Pgm().GetSettingsManager().GetAppSettings<GERBVIEW_SETTINGS>();
GetGalDisplayOptions().ReadWindowSettings( cfg->m_Window );
SetPageSettings( PAGE_INFO( gvconfig()->m_Appearance.page_type ) );
UpdateXORLayers();

View File

@ -609,6 +609,9 @@ void PL_EDITOR_FRAME::CommonSettingsChanged( bool aEnvVarsChanged, bool aTextVar
PL_EDITOR_SETTINGS* cfg = settingsManager.GetAppSettings<PL_EDITOR_SETTINGS>();
COLOR_SETTINGS* colors = settingsManager.GetColorSettings( cfg->m_ColorTheme );
// Update gal display options like cursor shape, grid options:
GetGalDisplayOptions().ReadWindowSettings( cfg->m_Window );
GetCanvas()->GetView()->GetPainter()->GetSettings()->LoadColors( colors );
GetCanvas()->GetView()->UpdateAllItems( KIGFX::COLOR );