Fix crash when loading new schematic with something selected

This commit is contained in:
Jon Evans 2020-10-27 22:04:43 -04:00
parent 31d502735c
commit 70c90266a8
1 changed files with 3 additions and 0 deletions

View File

@ -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<SCH_SCREEN*>( aScreen ) );
}