Make sure symbols have a valid lib nickname...
... even if the library pointer isn't set. Also fixes the "every symbol as a Unit A" issue. Fixes: lp:1785438 * https://bugs.launchpad.net/kicad/+bug/1785438
This commit is contained in:
parent
146ab1eb32
commit
08bcec9ac0
|
@ -157,8 +157,11 @@ LIB_TREE_NODE_LIB_ID::LIB_TREE_NODE_LIB_ID( LIB_TREE_NODE* aParent, LIB_TREE_ITE
|
|||
|
||||
IsRoot = aItem->IsRoot();
|
||||
|
||||
for( int u = 1; u <= aItem->GetUnitCount(); ++u )
|
||||
AddUnit( aItem, u );
|
||||
if( aItem->GetUnitCount() > 1 )
|
||||
{
|
||||
for( int u = 1; u <= aItem->GetUnitCount(); ++u )
|
||||
AddUnit( aItem, u );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -101,7 +101,7 @@ wxString LIB_ALIAS::GetLibNickname() const
|
|||
if( shared )
|
||||
return shared->GetLibraryName();
|
||||
|
||||
return wxString( _( "none" ) );
|
||||
return wxEmptyString;
|
||||
}
|
||||
|
||||
|
||||
|
@ -263,7 +263,7 @@ const wxString LIB_PART::GetLibraryName()
|
|||
if( m_library )
|
||||
return m_library->GetName();
|
||||
|
||||
return wxString( _( "none" ) );
|
||||
return m_libId.GetLibNickname();
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue