Fix pin rotatation and SPICE current probe statement for 2-pin symbols

Fixes: lp:1843159
* https://bugs.launchpad.net/kicad/+bug/1843159
This commit is contained in:
Jeff Young 2019-09-08 22:54:13 +01:00
parent 44a1cf9f1b
commit f21e24cd17
2 changed files with 8 additions and 2 deletions

View File

@ -125,7 +125,8 @@ const EDA_RECT SCH_PIN::GetBoundingBox() const
TRANSFORM t = GetParentComponent()->GetTransform(); TRANSFORM t = GetParentComponent()->GetTransform();
EDA_RECT r = m_libPin->GetBoundingBox(); EDA_RECT r = m_libPin->GetBoundingBox();
t.y2 = -t.y2; r.RevertYAxis();
r = t.TransformCoordinate( r ); r = t.TransformCoordinate( r );
r.Offset( GetParentComponent()->GetPosition() ); r.Offset( GetParentComponent()->GetPosition() );

View File

@ -469,7 +469,12 @@ int SCH_EDITOR_CONTROL::SimProbe( const TOOL_EVENT& aEvent )
{ {
SCH_PIN* pin = (SCH_PIN*) item; SCH_PIN* pin = (SCH_PIN*) item;
SCH_COMPONENT* comp = (SCH_COMPONENT*) item->GetParent(); SCH_COMPONENT* comp = (SCH_COMPONENT*) item->GetParent();
wxString param = wxString::Format( _T( "I%s" ), pin->GetName().Lower() ); wxString param;
if( comp->GetPins().size() <= 2 )
param = wxT( "I" );
else
param = wxString::Format( wxT( "I%s" ), pin->GetName().Lower() );
simFrame->AddCurrentPlot( comp->GetRef( g_CurrentSheet ), param ); simFrame->AddCurrentPlot( comp->GetRef( g_CurrentSheet ), param );
} }