← Back to team overview

kicad-developers team mailing list archive

[PATCH] Update dangling ends when adding no-connect

 

Since my recent change to hide dangling ends also responds to no-connect 
markers, SCH_NO_CONNECT should be changed to correctly update dangling 
ends after it is placed. This patch accomplishes that.

--
Chris
commit 32d30d6b24bc75bdfa300153d5e4430a15234456
Author: Chris Pavlina <cpavlin1@xxxxxxxxxxxxxx>
Date:   Mon Jun 22 11:23:50 2015 -0400

    Update dangling ends when adding no-connect

diff --git a/eeschema/bus-wire-junction.cpp b/eeschema/bus-wire-junction.cpp
index 62141bd..a33f7b5 100644
--- a/eeschema/bus-wire-junction.cpp
+++ b/eeschema/bus-wire-junction.cpp
@@ -379,14 +379,10 @@ SCH_NO_CONNECT* SCH_EDIT_FRAME::AddNoConnect( wxDC* aDC, const wxPoint& aPositio
     SCH_NO_CONNECT* no_connect = new SCH_NO_CONNECT( aPosition );
 
     SetRepeatItem( no_connect );
-
-    m_canvas->CrossHairOff( aDC );     // Erase schematic cursor
-    no_connect->Draw( m_canvas, aDC, wxPoint( 0, 0 ), GR_DEFAULT_DRAWMODE );
-
-    m_canvas->CrossHairOn( aDC );      // Display schematic cursor
-
     GetScreen()->Append( no_connect );
+    GetScreen()->SchematicCleanUp( m_canvas, aDC );
     OnModify();
+    m_canvas->Refresh();
     SaveCopyInUndoList( no_connect, UR_NEW );
     return no_connect;
 }

Follow ups