Save selection *before* clearing it. Saving after doesn't do much good.

Fixes https://gitlab.com/kicad/code/kicad/issues/11242

(cherry picked from commit 1751c8e1cf)
This commit is contained in:
Jeff Young 2022-05-05 17:18:29 +01:00
parent 1a6e9538cd
commit 3c4f8a335f
1 changed files with 2 additions and 1 deletions

View File

@ -668,10 +668,11 @@ int SCH_EDIT_TOOL::Rotate( const TOOL_EVENT& aEvent )
}
else
{
EE_SELECTION selectionCopy = selection;
if( selection.IsHover() )
m_toolMgr->RunAction( EE_ACTIONS::clearSelection, true );
EE_SELECTION selectionCopy = selection;
m_toolMgr->RunAction( EE_ACTIONS::trimOverlappingWires, true, &selectionCopy );
m_toolMgr->RunAction( EE_ACTIONS::addNeededJunctions, true, &selectionCopy );