Fix SCH_PIN location calculation
This commit is contained in:
parent
99e57724e6
commit
ff8b7cc6c1
|
@ -180,13 +180,19 @@ bool CONNECTION_SUBGRAPH::ResolveDrivers( bool aCreateMarkers )
|
||||||
|
|
||||||
wxASSERT( candidates[0] != candidates[1] );
|
wxASSERT( candidates[0] != candidates[1] );
|
||||||
|
|
||||||
|
auto p0 = ( candidates[0]->Type() == SCH_PIN_T ) ?
|
||||||
|
static_cast<SCH_PIN*>( candidates[0] )->GetTransformedPosition() :
|
||||||
|
candidates[0]->GetPosition();
|
||||||
|
|
||||||
|
auto p1 = ( candidates[1]->Type() == SCH_PIN_T ) ?
|
||||||
|
static_cast<SCH_PIN*>( candidates[1] )->GetTransformedPosition() :
|
||||||
|
candidates[1]->GetPosition();
|
||||||
|
|
||||||
auto marker = new SCH_MARKER();
|
auto marker = new SCH_MARKER();
|
||||||
marker->SetTimeStamp( GetNewTimeStamp() );
|
marker->SetTimeStamp( GetNewTimeStamp() );
|
||||||
marker->SetMarkerType( MARKER_BASE::MARKER_ERC );
|
marker->SetMarkerType( MARKER_BASE::MARKER_ERC );
|
||||||
marker->SetErrorLevel( MARKER_BASE::MARKER_SEVERITY_WARNING );
|
marker->SetErrorLevel( MARKER_BASE::MARKER_SEVERITY_WARNING );
|
||||||
marker->SetData( ERCE_DRIVER_CONFLICT,
|
marker->SetData( ERCE_DRIVER_CONFLICT, p0, msg, p1 );
|
||||||
candidates[0]->GetPosition(), msg,
|
|
||||||
candidates[1]->GetPosition() );
|
|
||||||
|
|
||||||
m_sheet.LastScreen()->Append( marker );
|
m_sheet.LastScreen()->Append( marker );
|
||||||
|
|
||||||
|
|
|
@ -86,3 +86,9 @@ wxString SCH_PIN::GetDefaultNetName( const SCH_SHEET_PATH aPath )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
wxPoint SCH_PIN::GetTransformedPosition() const
|
||||||
|
{
|
||||||
|
auto t = m_comp->GetTransform();
|
||||||
|
return ( t.TransformCoordinate( GetPosition() ) +
|
||||||
|
m_comp->GetPosition() );
|
||||||
|
}
|
||||||
|
|
|
@ -77,6 +77,9 @@ public:
|
||||||
|
|
||||||
void SetIsDangling( bool isDangling ) { m_isDangling = isDangling; }
|
void SetIsDangling( bool isDangling ) { m_isDangling = isDangling; }
|
||||||
|
|
||||||
|
/// Returns the pin's position in global coordinates
|
||||||
|
wxPoint GetTransformedPosition() const;
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* While many of these are currently simply covers for the equivalent LIB_PIN methods,
|
* While many of these are currently simply covers for the equivalent LIB_PIN methods,
|
||||||
|
|
Loading…
Reference in New Issue