From 7b734551d3ad21ac2255adb5e8b9edd771319a77 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Sun, 29 Apr 2018 16:54:37 +0100 Subject: [PATCH] Make sure pin-caches are up-to-date before testing dangling ends. Fixes: lp:1767745 * https://bugs.launchpad.net/kicad/+bug/1767745 --- eeschema/dialogs/dialog_edit_component_in_schematic.cpp | 2 ++ eeschema/sch_component.cpp | 3 +++ 2 files changed, 5 insertions(+) diff --git a/eeschema/dialogs/dialog_edit_component_in_schematic.cpp b/eeschema/dialogs/dialog_edit_component_in_schematic.cpp index 0126f61f11..2c255e0e14 100644 --- a/eeschema/dialogs/dialog_edit_component_in_schematic.cpp +++ b/eeschema/dialogs/dialog_edit_component_in_schematic.cpp @@ -555,6 +555,8 @@ void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::OnOKButtonClick( wxCommandEvent& event } } + m_cmp->UpdatePinCache(); + GetParent()->OnModify(); GetParent()->GetScreen()->TestDanglingEnds(); diff --git a/eeschema/sch_component.cpp b/eeschema/sch_component.cpp index fc261ea8a8..b42264cd08 100644 --- a/eeschema/sch_component.cpp +++ b/eeschema/sch_component.cpp @@ -1057,6 +1057,9 @@ void SCH_COMPONENT::SwapData( SCH_ITEM* aItem ) std::swap( m_unit, component->m_unit ); std::swap( m_convert, component->m_convert ); + std::swap( m_Pins, component->m_Pins ); + std::swap( m_isDangling, component->m_isDangling ); + TRANSFORM tmp = m_transform; m_transform = component->m_transform;