From 70c90266a84f48823ea68f84be5b27b57094656f Mon Sep 17 00:00:00 2001 From: Jon Evans Date: Tue, 27 Oct 2020 22:04:43 -0400 Subject: [PATCH] Fix crash when loading new schematic with something selected --- eeschema/sch_edit_frame.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/eeschema/sch_edit_frame.cpp b/eeschema/sch_edit_frame.cpp index 4ef114fd40..fd8c1a34f2 100644 --- a/eeschema/sch_edit_frame.cpp +++ b/eeschema/sch_edit_frame.cpp @@ -1449,6 +1449,9 @@ void SCH_EDIT_FRAME::UpdateNetHighlightStatus() void SCH_EDIT_FRAME::SetScreen( BASE_SCREEN* aScreen ) { + if( m_toolManager ) + m_toolManager->RunAction( EE_ACTIONS::clearSelection, true ); + SCH_BASE_FRAME::SetScreen( aScreen ); GetCanvas()->DisplaySheet( static_cast( aScreen ) ); }