Pcbnew: fix strange behavior when editing board setup, if a zone is currently selected.

The zone was silently deleted.

Fixes #3673 | https://gitlab.com/kicad/code/kicad/issues/3673
This commit is contained in:
jean-pierre charras 2019-12-16 12:44:53 +01:00
parent d40019210f
commit 6bc8005d60
1 changed files with 4 additions and 2 deletions

View File

@ -161,10 +161,12 @@ void SELECTION_TOOL::Reset( RESET_REASON aReason )
if( aReason == TOOL_BASE::MODEL_RELOAD )
{
// Remove pointers to the selected items from containers
// Deselect any item being currently in edit, to avoid unexpected behavior
// and remove pointers to the selected items from containers
// without changing their properties (as they are already deleted
// while a new board is loaded)
m_selection.Clear();
ClearSelection( true );
getView()->GetPainter()->GetSettings()->SetHighlight( false );
}
else