Browse Source

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
merge-requests/20/head
jean-pierre charras 6 years ago
parent
commit
6bc8005d60
  1. 6
      pcbnew/tools/selection_tool.cpp

6
pcbnew/tools/selection_tool.cpp

@ -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

Loading…
Cancel
Save