From 1751c8e1cf7c3b4c63e2213b3bfc346348b18865 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Thu, 5 May 2022 17:18:29 +0100 Subject: [PATCH] Save selection *before* clearing it. Saving after doesn't do much good. Fixes https://gitlab.com/kicad/code/kicad/issues/11242 --- eeschema/tools/sch_edit_tool.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/eeschema/tools/sch_edit_tool.cpp b/eeschema/tools/sch_edit_tool.cpp index 0c36789b1f..bd3e0e9713 100644 --- a/eeschema/tools/sch_edit_tool.cpp +++ b/eeschema/tools/sch_edit_tool.cpp @@ -726,10 +726,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 );