Check driver instead of parent for prepending path to connection name

This commit is contained in:
Jon Evans 2019-04-01 20:21:20 -04:00
parent 8b30cd4389
commit 3c27617782
1 changed files with 14 additions and 11 deletions

View File

@ -252,20 +252,23 @@ wxString SCH_CONNECTION::Name( bool aIgnoreSheet ) const
bool prepend_path = true;
switch( Parent()->Type() )
if( m_driver )
{
case SCH_PIN_CONNECTION_T:
// Pins are either power connections or belong to a uniquely-annotated
// component, so they don't need a path
prepend_path = false;
break;
switch( m_driver->Type() )
{
case SCH_PIN_CONNECTION_T:
// Pins are either power connections or belong to a uniquely-annotated
// component, so they don't need a path if they are driving the subgraph
prepend_path = false;
break;
case SCH_GLOBAL_LABEL_T:
prepend_path = false;
break;
case SCH_GLOBAL_LABEL_T:
prepend_path = false;
break;
default:
break;
default:
break;
}
}
if( prepend_path && !aIgnoreSheet )