From 4d5c4c4ea89e6d81b37d31e4179a3b54d257e262 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Sun, 8 Jan 2023 11:52:21 +0100 Subject: [PATCH] Ensure all selected items have their edit flags cleared after move. Some sub-items like fields can be selected, and are not in the main item list. Fixes #13435 https://gitlab.com/kicad/code/kicad/issues/13435 --- eeschema/tools/sch_move_tool.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/eeschema/tools/sch_move_tool.cpp b/eeschema/tools/sch_move_tool.cpp index c2a83e1735..561f1dd780 100644 --- a/eeschema/tools/sch_move_tool.cpp +++ b/eeschema/tools/sch_move_tool.cpp @@ -935,6 +935,11 @@ int SCH_MOVE_TOOL::Main( const TOOL_EVENT& aEvent ) for( EDA_ITEM* item : m_frame->GetScreen()->Items() ) item->ClearEditFlags(); + // ensure any selected item not in screen main list (for instance symbol fields) + // has its edit flags cleared + for( EDA_ITEM* item : selectionCopy ) + item->ClearEditFlags(); + if( unselect ) m_toolMgr->RunAction( EE_ACTIONS::clearSelection, true ); else @@ -944,6 +949,7 @@ int SCH_MOVE_TOOL::Main( const TOOL_EVENT& aEvent ) m_lineConnectionCache.clear(); m_moveInProgress = false; m_frame->PopTool( aEvent ); + return 0; }