From a72d32d3fd36432292ac360c9ac4649a2ac101b6 Mon Sep 17 00:00:00 2001 From: Chris Pavlina Date: Fri, 10 Mar 2017 09:36:55 -0500 Subject: [PATCH] Test for dangling pins after symbol is edited Fixes: lp:1562897 * https://bugs.launchpad.net/kicad/+bug/1562897 --- eeschema/class_sch_screen.h | 1 + eeschema/libeditframe.cpp | 1 + eeschema/sch_screen.cpp | 7 +++++++ 3 files changed, 9 insertions(+) diff --git a/eeschema/class_sch_screen.h b/eeschema/class_sch_screen.h index b60d675eb1..b9ef7fef87 100644 --- a/eeschema/class_sch_screen.h +++ b/eeschema/class_sch_screen.h @@ -588,6 +588,7 @@ public: enum MARKER_BASE::MARKER_SEVERITY aSeverity ); void UpdateSymbolLinks(); + void TestDanglingEnds(); private: void AddScreenToList( SCH_SCREEN* aScreen ); diff --git a/eeschema/libeditframe.cpp b/eeschema/libeditframe.cpp index 0c28056337..b1576359f6 100644 --- a/eeschema/libeditframe.cpp +++ b/eeschema/libeditframe.cpp @@ -1448,6 +1448,7 @@ void LIB_EDIT_FRAME::refreshSchematic() SCH_SCREENS schematic; schematic.UpdateSymbolLinks(); + schematic.TestDanglingEnds(); // There may be no parent window so use KIWAY message to refresh the schematic editor // in case any symbols have changed. diff --git a/eeschema/sch_screen.cpp b/eeschema/sch_screen.cpp index 5287a7154f..6f48374c6c 100644 --- a/eeschema/sch_screen.cpp +++ b/eeschema/sch_screen.cpp @@ -1522,6 +1522,13 @@ void SCH_SCREENS::UpdateSymbolLinks() } +void SCH_SCREENS::TestDanglingEnds() +{ + for( SCH_SCREEN* screen = GetFirst(); screen; screen = GetNext() ) + screen->TestDanglingEnds(); +} + + #if defined(DEBUG) void SCH_SCREEN::Show( int nestLevel, std::ostream& os ) const {