From c2f7dbfc151c1f7cbd9c2b81ca20af641fb540f1 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Sat, 7 Jan 2023 09:06:03 +0100 Subject: [PATCH] Eeschema, AlignElements(): fix broken align of lines (bus, wire, graphic line) It was due to a recent change (commit d824b7f5) for SCH_LINE_T in SCH_MOVE_TOOL::moveItem() --- eeschema/tools/sch_move_tool.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/eeschema/tools/sch_move_tool.cpp b/eeschema/tools/sch_move_tool.cpp index bb1c1e5958..c2a83e1735 100644 --- a/eeschema/tools/sch_move_tool.cpp +++ b/eeschema/tools/sch_move_tool.cpp @@ -1564,8 +1564,13 @@ int SCH_MOVE_TOOL::AlignElements( const TOOL_EVENT& aEvent ) { saveCopyInUndoList( item, UNDO_REDO::CHANGED, appendUndo ); appendUndo = true; - + // Ensure only one end is moved when calling moveItem + // i.e. we are in drag mode + bool tmp_isDrag = m_isDrag; + m_isDrag = true; moveItem( item, delta ); + m_isDrag = tmp_isDrag; + item->ClearFlags( IS_MOVING ); updateItem( item, true ); };