From 955a5a13eb2a7a3e37aed8295cc2d41d77f58d39 Mon Sep 17 00:00:00 2001 From: Jon Evans Date: Thu, 16 Feb 2023 08:17:00 -0500 Subject: [PATCH] Symbol editor: stop removing overlay from view Fixes https://gitlab.com/kicad/code/kicad/-/issues/13944 --- eeschema/symbol_editor/symbol_edit_frame.cpp | 8 ++++++++ eeschema/symbol_editor/symbol_editor.cpp | 4 ++++ 2 files changed, 12 insertions(+) diff --git a/eeschema/symbol_editor/symbol_edit_frame.cpp b/eeschema/symbol_editor/symbol_edit_frame.cpp index d345274b11..96897bee46 100644 --- a/eeschema/symbol_editor/symbol_edit_frame.cpp +++ b/eeschema/symbol_editor/symbol_edit_frame.cpp @@ -1215,6 +1215,10 @@ void SYMBOL_EDIT_FRAME::ShowChangedLanguage() void SYMBOL_EDIT_FRAME::SetScreen( BASE_SCREEN* aScreen ) { SCH_BASE_FRAME::SetScreen( aScreen ); + + // Let tools add things to the view if necessary + if( m_toolManager ) + m_toolManager->ResetTools( TOOL_BASE::MODEL_RELOAD ); } @@ -1228,6 +1232,10 @@ void SYMBOL_EDIT_FRAME::RebuildView() GetCanvas()->GetView()->HideDrawingSheet(); GetCanvas()->GetView()->ClearHiddenFlags(); + // Let tools add things to the view if necessary + if( m_toolManager ) + m_toolManager->ResetTools( TOOL_BASE::MODEL_RELOAD ); + GetCanvas()->GetView()->UpdateAllItems( KIGFX::ALL ); GetCanvas()->Refresh(); } diff --git a/eeschema/symbol_editor/symbol_editor.cpp b/eeschema/symbol_editor/symbol_editor.cpp index 82a282dedd..5680ab0a25 100644 --- a/eeschema/symbol_editor/symbol_editor.cpp +++ b/eeschema/symbol_editor/symbol_editor.cpp @@ -304,6 +304,10 @@ bool SYMBOL_EDIT_FRAME::LoadOneLibrarySymbolAux( LIB_SYMBOL* aEntry, const wxStr ClearUndoRedoList(); + // Let tools add things to the view if necessary + if( m_toolManager ) + m_toolManager->ResetTools( TOOL_BASE::MODEL_RELOAD ); + // Display the document information based on the entry selected just in // case the entry is an alias. UpdateMsgPanel();