From 6b3ff2d59a56c59c152f53f98dde0d21fd0a818b Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 6 Sep 2015 15:07:46 +0200 Subject: [PATCH] Eeschema:fix bug 1492542 component pins look disconnected if component is selected and then pan/scroll/zoom view --- eeschema/sch_bus_entry.cpp | 8 +++++--- eeschema/sch_component.cpp | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/eeschema/sch_bus_entry.cpp b/eeschema/sch_bus_entry.cpp index 0064c344cd..9ac88068c4 100644 --- a/eeschema/sch_bus_entry.cpp +++ b/eeschema/sch_bus_entry.cpp @@ -199,16 +199,18 @@ void SCH_BUS_ENTRY_BASE::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& // Draw pin targets if part is being dragged - bool dragging = ( aPanel->GetScreen()->GetCurItem() == this ); + bool dragging = aPanel->GetScreen()->GetCurItem() == this && aPanel->IsMouseCaptured(); if( m_isDanglingStart || dragging ) { - GRCircle( clipbox, aDC, m_pos.x + aOffset.x, m_pos.y + aOffset.y, TARGET_BUSENTRY_RADIUS, 0, color ); + GRCircle( clipbox, aDC, m_pos.x + aOffset.x, m_pos.y + aOffset.y, + TARGET_BUSENTRY_RADIUS, 0, color ); } if( m_isDanglingEnd || dragging ) { - GRCircle( clipbox, aDC, m_End().x + aOffset.x, m_End().y + aOffset.y, TARGET_BUSENTRY_RADIUS, 0, color ); + GRCircle( clipbox, aDC, m_End().x + aOffset.x, m_End().y + aOffset.y, + TARGET_BUSENTRY_RADIUS, 0, color ); } } diff --git a/eeschema/sch_component.cpp b/eeschema/sch_component.cpp index 35c60c658d..82694d8083 100644 --- a/eeschema/sch_component.cpp +++ b/eeschema/sch_component.cpp @@ -351,7 +351,7 @@ void SCH_COMPONENT::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aOff if( PART_SPTR part = m_part.lock() ) { // Draw pin targets if part is being dragged - bool dragging = ( aPanel->GetScreen()->GetCurItem() == this ); + bool dragging = aPanel->GetScreen()->GetCurItem() == this && aPanel->IsMouseCaptured(); part->Draw( aPanel, aDC, m_Pos + aOffset, m_unit, m_convert, aDrawMode, aColor, m_transform, aDrawPinText, false, false, dragging ? NULL : &m_isDangling );