Clear caches when changing global default font.

This commit is contained in:
Jeff Young 2022-01-09 00:44:24 +00:00
parent a42f33414e
commit 92d5a3e763
2 changed files with 11 additions and 0 deletions

View File

@ -1517,6 +1517,14 @@ void SCH_EDIT_FRAME::CommonSettingsChanged( bool aEnvVarsChanged, bool aTextVars
view->SetLayerVisible( LAYER_ERC_WARN, cfg->m_Appearance.show_erc_warnings ); view->SetLayerVisible( LAYER_ERC_WARN, cfg->m_Appearance.show_erc_warnings );
view->SetLayerVisible( LAYER_ERC_EXCLUSION, cfg->m_Appearance.show_erc_exclusions ); view->SetLayerVisible( LAYER_ERC_EXCLUSION, cfg->m_Appearance.show_erc_exclusions );
SCH_SCREEN* screen = GetCurrentSheet().LastScreen();
for( SCH_ITEM* item : screen->Items() )
item->ClearCaches();
for( std::pair<const wxString, LIB_SYMBOL*>& libSymbol : screen->GetLibSymbols() )
libSymbol.second->ClearCaches();
GetCanvas()->ForceRefresh(); GetCanvas()->ForceRefresh();
RecreateToolbars(); RecreateToolbars();

View File

@ -1104,6 +1104,9 @@ void SYMBOL_EDIT_FRAME::CommonSettingsChanged( bool aEnvVarsChanged, bool aTextV
GetGalDisplayOptions().ReadWindowSettings( cfg->m_Window ); GetGalDisplayOptions().ReadWindowSettings( cfg->m_Window );
if( m_symbol )
m_symbol->ClearCaches();
GetCanvas()->ForceRefresh(); GetCanvas()->ForceRefresh();
RecreateToolbars(); RecreateToolbars();