Don't add global labels when a power symbol is connected.
Fixes https://gitlab.com/kicad/code/kicad/issues/7497
This commit is contained in:
parent
04aff93248
commit
469d3ea329
|
@ -1081,8 +1081,16 @@ void SCH_EAGLE_PLUGIN::loadSegments( wxXmlNode* aSegmentsNode, const wxString& n
|
||||||
else if( nodeName == "pinref" )
|
else if( nodeName == "pinref" )
|
||||||
{
|
{
|
||||||
segmentAttribute->GetAttribute( "gate" ); // REQUIRED
|
segmentAttribute->GetAttribute( "gate" ); // REQUIRED
|
||||||
segmentAttribute->GetAttribute( "part" ); // REQUIRED
|
wxString part = segmentAttribute->GetAttribute( "part" ); // REQUIRED
|
||||||
segmentAttribute->GetAttribute( "pin" ); // REQUIRED
|
wxString pin = segmentAttribute->GetAttribute( "pin" ); // REQUIRED
|
||||||
|
|
||||||
|
auto powerPort = m_powerPorts.find( "#" + part );
|
||||||
|
|
||||||
|
if( powerPort != m_powerPorts.end()
|
||||||
|
&& powerPort->second == EscapeString( pin, CTX_NETNAME ) )
|
||||||
|
{
|
||||||
|
labelled = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if( nodeName == "wire" )
|
else if( nodeName == "wire" )
|
||||||
{
|
{
|
||||||
|
@ -1460,6 +1468,9 @@ void SCH_EAGLE_PLUGIN::loadInstance( wxXmlNode* aInstanceNode )
|
||||||
for( const LIB_PIN* pin : pins )
|
for( const LIB_PIN* pin : pins )
|
||||||
m_connPoints[symbol->GetPinPhysicalPosition( pin )].emplace( pin );
|
m_connPoints[symbol->GetPinPhysicalPosition( pin )].emplace( pin );
|
||||||
|
|
||||||
|
if( part->IsPower() )
|
||||||
|
m_powerPorts[ reference ] = symbol->GetField( VALUE_FIELD )->GetText();
|
||||||
|
|
||||||
symbol->ClearFlags();
|
symbol->ClearFlags();
|
||||||
|
|
||||||
screen->Append( symbol.release() );
|
screen->Append( symbol.release() );
|
||||||
|
|
|
@ -234,6 +234,8 @@ private:
|
||||||
|
|
||||||
std::map<wxString, int> m_netCounts;
|
std::map<wxString, int> m_netCounts;
|
||||||
std::map<int, SCH_LAYER_ID> m_layerMap;
|
std::map<int, SCH_LAYER_ID> m_layerMap;
|
||||||
|
std::map<wxString, wxString> m_powerPorts; ///< map from symbol reference to global
|
||||||
|
///< label equivalent
|
||||||
|
|
||||||
///< Wire intersection points, used for quick checks whether placing a net label in a particular
|
///< Wire intersection points, used for quick checks whether placing a net label in a particular
|
||||||
///< place would short two nets.
|
///< place would short two nets.
|
||||||
|
|
Loading…
Reference in New Issue