From d48e7f159c286b70ba0c4f66b881a990bc24af01 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Sat, 8 Jul 2023 20:33:37 +0100 Subject: [PATCH] Re-install tool view items after clearing the view. Fixes https://gitlab.com/kicad/code/kicad/-/issues/15149 --- eeschema/sch_view.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/eeschema/sch_view.cpp b/eeschema/sch_view.cpp index c308cc50d7..ea77509efd 100644 --- a/eeschema/sch_view.cpp +++ b/eeschema/sch_view.cpp @@ -31,6 +31,7 @@ #include #include #include +#include #include #include #include @@ -126,6 +127,10 @@ void SCH_VIEW::DisplaySheet( const SCH_SCREEN *aScreen ) Add( m_drawingSheet.get() ); InitPreview(); + + // Allow tools to add anything they require to the view (such as the selection VIEW_GROUP) + if( m_frame && m_frame->GetToolManager() ) + m_frame->GetToolManager()->ResetTools( TOOL_BASE::REDRAW ); }