Browse Source

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

Fixes: lp:1843159
* https://bugs.launchpad.net/kicad/+bug/1843159
pull/15/head
Jeff Young 6 years ago
parent
commit
f21e24cd17
  1. 3
      eeschema/sch_pin.cpp
  2. 7
      eeschema/tools/sch_editor_control.cpp

3
eeschema/sch_pin.cpp

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

7
eeschema/tools/sch_editor_control.cpp

@ -469,7 +469,12 @@ int SCH_EDITOR_CONTROL::SimProbe( const TOOL_EVENT& aEvent )
{
SCH_PIN* pin = (SCH_PIN*) item;
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 );
}

Loading…
Cancel
Save