Eeschema:fix bug 1492542 component pins look disconnected if component is selected and then pan/scroll/zoom view

This commit is contained in:
unknown 2015-09-06 15:07:46 +02:00 committed by jean-pierre charras
parent 2f0cf27ae4
commit 6b3ff2d59a
2 changed files with 6 additions and 4 deletions

View File

@ -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 );
}
}

View File

@ -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 );