diff --git a/common/lib_tree_model.cpp b/common/lib_tree_model.cpp index e7983c89a6..68fe2bb75d 100644 --- a/common/lib_tree_model.cpp +++ b/common/lib_tree_model.cpp @@ -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 ); + } } diff --git a/eeschema/class_libentry.cpp b/eeschema/class_libentry.cpp index 46d94b8fb5..ff23a48cfb 100644 --- a/eeschema/class_libentry.cpp +++ b/eeschema/class_libentry.cpp @@ -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(); }