diff --git a/eeschema/lib_pin.h b/eeschema/lib_pin.h index 29993650cf..ab5ebd3b7b 100644 --- a/eeschema/lib_pin.h +++ b/eeschema/lib_pin.h @@ -37,6 +37,7 @@ class SCH_COMPONENT; #include "pin_shape.h" #include "pin_type.h" +#include "class_libentry.h" // Circle diameter drawn at the active end of pins: #define TARGET_PIN_RADIUS 12 @@ -362,7 +363,13 @@ public: * Return whether this pin forms an implicit power connection: i.e., is hidden * and of type POWER_IN. */ - bool IsPowerConnection() const { return !IsVisible() && GetType() == PIN_POWER_IN; } + bool IsPowerConnection() const { + + return ( + ( !IsVisible() && GetType() == PIN_POWER_IN ) + || + ( (LIB_PART*)GetParent()->IsPower() && GetType() == PIN_POWER_IN ) + ) ; } int GetPenSize() const override; diff --git a/eeschema/sch_eagle_plugin.cpp b/eeschema/sch_eagle_plugin.cpp index 76e340d476..dce4cbbbf0 100644 --- a/eeschema/sch_eagle_plugin.cpp +++ b/eeschema/sch_eagle_plugin.cpp @@ -1301,7 +1301,7 @@ bool SCH_EAGLE_PLUGIN::loadSymbol( wxXmlNode* aSymbolNode, if(wxString(*ePin.direction).Lower()== "sup") { ispower = true; - pin->SetType(PIN_POWER_OUT); + pin->SetType(PIN_POWER_IN); } else if(wxString(*ePin.direction).Lower()== "pas") { @@ -1373,6 +1373,8 @@ bool SCH_EAGLE_PLUGIN::loadSymbol( wxXmlNode* aSymbolNode, { pin->SetPartNumber( gateNumber ); pin->SetUnit( gateNumber ); + wxString stringPinNum = wxString::Format(wxT("%i"),pincount); + pin->SetPinNumFromString(stringPinNum); aPart->AddDrawItem( pin.release() ); } }