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()
This commit is contained in:
jean-pierre charras 2023-01-07 09:06:03 +01:00
parent 03e12535a8
commit c2f7dbfc15
1 changed files with 6 additions and 1 deletions

View File

@ -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 );
};