Display pin and bus connection targets when moving for better user feedback.

This commit is contained in:
Chris Pavlina 2015-06-15 10:41:08 -04:00 committed by Wayne Stambaugh
parent 49fac351ab
commit dc33bb1868
2 changed files with 10 additions and 3 deletions

View File

@ -197,11 +197,15 @@ void SCH_BUS_ENTRY_BASE::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint&
GRLine( clipbox, aDC, m_pos.x + aOffset.x, m_pos.y + aOffset.y,
m_End().x + aOffset.x, m_End().y + aOffset.y, GetPenSize(), color );
if( m_isDanglingStart ) {
// Draw pin targets if part is being dragged
bool dragging = ( aPanel->GetScreen()->GetCurItem() == this );
if( m_isDanglingStart || dragging ) {
GRCircle( clipbox, aDC, m_pos.x + aOffset.x, m_pos.y + aOffset.y, TARGET_BUSENTRY_RADIUS, 0, color );
}
if( m_isDanglingEnd ) {
if( m_isDanglingEnd || dragging ) {
GRCircle( clipbox, aDC, m_End().x + aOffset.x, m_End().y + aOffset.y, TARGET_BUSENTRY_RADIUS, 0, color );
}
}

View File

@ -350,8 +350,11 @@ 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 );
part->Draw( aPanel, aDC, m_Pos + aOffset, m_unit, m_convert, aDrawMode, aColor,
m_transform, aDrawPinText, false, false, &m_isDangling );
m_transform, aDrawPinText, false, false, dragging ? NULL : &m_isDangling );
}
else // Use dummy() part if the actual cannot be found.
{