Re-install tool view items after clearing the view.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15149
This commit is contained in:
Jeff Young 2023-07-08 20:33:37 +01:00
parent 692e060ff4
commit d48e7f159c
1 changed files with 5 additions and 0 deletions

View File

@ -31,6 +31,7 @@
#include <view/view_rtree.h>
#include <view/wx_view_controls.h>
#include <drawing_sheet/ds_proxy_view_item.h>
#include <tool/tool_manager.h>
#include <layer_ids.h>
#include <sch_screen.h>
#include <schematic.h>
@ -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 );
}