Browse Source

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

pull/5/head
Chris Pavlina 11 years ago
committed by Wayne Stambaugh
parent
commit
dc33bb1868
  1. 8
      eeschema/sch_bus_entry.cpp
  2. 5
      eeschema/sch_component.cpp

8
eeschema/sch_bus_entry.cpp

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

5
eeschema/sch_component.cpp

@ -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.
{

Loading…
Cancel
Save