From 2fa5c723d8aaa855179df53b01382acb06d2bdb3 Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Mon, 15 Jan 2018 14:24:21 -0800 Subject: [PATCH] Don't cleanup schematic when symbols are rescued. Schematic cleanup only makes sense after the libraries are fully updated and loaded. Before pin caching, this was a minor difference but once we needed to update pin caches, schematic cleanup can remove junctions from pin-wire connections incorrectly. Instead, we use the global OpenProjectFiles() schematic cleanup call to be sufficient and not call a second time, prior to all libraries being rescued and loaded. Fixes: lp:1743148 * https://bugs.launchpad.net/kicad/+bug/1743148 --- eeschema/bus-wire-junction.cpp | 4 +++- eeschema/project_rescue.cpp | 2 -- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eeschema/bus-wire-junction.cpp b/eeschema/bus-wire-junction.cpp index b094e2eaa1..9c9791944c 100644 --- a/eeschema/bus-wire-junction.cpp +++ b/eeschema/bus-wire-junction.cpp @@ -450,7 +450,9 @@ bool SCH_EDIT_FRAME::TrimWire( const wxPoint& aStart, const wxPoint& aEnd, bool { next_item = item->Next(); - if( item->GetFlags() & STRUCT_DELETED ) + // Don't remove wires that are already deleted, are currently being + // dragged or are just created + if( item->GetFlags() & ( STRUCT_DELETED | IS_DRAGGED | IS_NEW ) ) continue; if( item->Type() != SCH_LINE_T || item->GetLayer() != LAYER_WIRE ) diff --git a/eeschema/project_rescue.cpp b/eeschema/project_rescue.cpp index a6a48cf298..1dd76cb819 100644 --- a/eeschema/project_rescue.cpp +++ b/eeschema/project_rescue.cpp @@ -586,8 +586,6 @@ bool SCH_EDIT_FRAME::rescueProject( RESCUER& aRescuer, bool aRunningOnDemand ) if( viewer ) viewer->ReCreateListLib(); - // Clean up wire ends - SchematicCleanUp(); GetScreen()->ClearUndoORRedoList( GetScreen()->m_UndoList, 1 ); m_canvas->Refresh( true ); OnModify();