From 8aabdcff9cf29fb0099f418f4e98a6c7b938cd66 Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Tue, 28 Jun 2022 16:44:18 -0700 Subject: [PATCH] Refresh draw objects when common settings change Common settings may change colors so make sure that we refresh the draw objects when the settings change to draw them in the proper colors. Failing to do this may also cause left over lines on the screen depending on OpenGL drivers Fixes https://gitlab.com/kicad/code/kicad/issues/11921 --- eeschema/symbol_editor/symbol_edit_frame.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/eeschema/symbol_editor/symbol_edit_frame.cpp b/eeschema/symbol_editor/symbol_edit_frame.cpp index ea34c7d490..7aefa235fa 100644 --- a/eeschema/symbol_editor/symbol_edit_frame.cpp +++ b/eeschema/symbol_editor/symbol_edit_frame.cpp @@ -1119,6 +1119,9 @@ void SYMBOL_EDIT_FRAME::CommonSettingsChanged( bool aEnvVarsChanged, bool aTextV GetCanvas()->GetGAL()->SetAxesColor( m_colorSettings->GetColor( LAYER_SCHEMATIC_GRID_AXES ) ); GetCanvas()->GetGAL()->DrawGrid(); + GetCanvas()->GetView()->UpdateAllItems( KIGFX::ALL ); + GetCanvas()->Refresh(); + RecreateToolbars(); if( aEnvVarsChanged ) @@ -1166,6 +1169,7 @@ void SYMBOL_EDIT_FRAME::RebuildView() GetCanvas()->GetView()->HideDrawingSheet(); GetCanvas()->GetView()->ClearHiddenFlags(); + GetCanvas()->GetView()->UpdateAllItems( KIGFX::ALL ); GetCanvas()->Refresh(); }