From c33d1ab2445ddc07e5d0d856993be2b33d4679c8 Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Mon, 5 Jun 2023 09:11:16 -0700 Subject: [PATCH] Don't dirty the item connectivity prematurely Item connectivity changes once the elements are commited, not during the process of moving. Fixes https://gitlab.com/kicad/code/kicad/-/issues/14884 --- 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 a64bc4e33e..1be90ee2a0 100644 --- a/eeschema/tools/sch_move_tool.cpp +++ b/eeschema/tools/sch_move_tool.cpp @@ -604,7 +604,7 @@ int SCH_MOVE_TOOL::Main( const TOOL_EVENT& aEvent ) } else { - saveCopyInUndoList( (SCH_ITEM*) item, UNDO_REDO::CHANGED, appendUndo ); + saveCopyInUndoList( (SCH_ITEM*) item, UNDO_REDO::CHANGED, appendUndo, false ); appendUndo = true; } @@ -923,8 +923,13 @@ int SCH_MOVE_TOOL::Main( const TOOL_EVENT& aEvent ) { // One last update after exiting loop (for slower stuff, such as updating SCREEN's RTree). for( EDA_ITEM* item : selection ) + { updateItem( item, true ); + if( SCH_ITEM* sch_item = dynamic_cast( item ) ) + sch_item->SetConnectivityDirty( true ); + } + m_selectionTool->RemoveItemsFromSel( &m_dragAdditions, QUIET_MODE ); // If we move items away from a junction, we _may_ want to add a junction there