Update all aliases of current node after Symbol Properties dialog.
Fixes: lp:1840466 * https://bugs.launchpad.net/kicad/+bug/1840466
This commit is contained in:
parent
b25ffc0aa8
commit
f8f5ffd560
|
@ -506,7 +506,19 @@ void LIB_EDIT_FRAME::UpdateAfterSymbolProperties( wxString* aOldName, wxArrayStr
|
|||
}
|
||||
|
||||
if( aOldAliases && *aOldAliases != part->GetAliasNames( false ) )
|
||||
{
|
||||
// If the number of aliases (or their names) have changed, do a full re-sync
|
||||
SyncLibraries( false );
|
||||
}
|
||||
else
|
||||
{
|
||||
// Otherwise just update each alias
|
||||
for( LIB_ALIAS* alias : part->GetAliases() )
|
||||
{
|
||||
wxDataViewItem item = m_libMgr->GetAdapter()->FindItem( alias->GetLibId() );
|
||||
static_cast<LIB_TREE_NODE_LIB_ID*>( item.GetID() )->Update( alias );
|
||||
}
|
||||
}
|
||||
|
||||
// Reselect the renamed part
|
||||
m_treePane->GetLibTree()->SelectLibId( LIB_ID( lib, part->GetName() ) );
|
||||
|
|
|
@ -227,21 +227,7 @@ void SYMBOL_TREE_SYNCHRONIZING_ADAPTER::GetValue( wxVariant& aVariant, wxDataVie
|
|||
break;
|
||||
|
||||
case 1:
|
||||
if( node->LibId == m_libMgr->GetCurrentLibId() )
|
||||
{
|
||||
LIB_ALIAS* alias = nullptr;
|
||||
|
||||
// When the node parent name is empty, the node is a lib name, not a symbol name
|
||||
if( !node->Parent->Name.IsEmpty() )
|
||||
alias = m_libMgr->GetAlias( node->Name, node->Parent->Name );
|
||||
|
||||
if( alias )
|
||||
aVariant = alias->GetDescription();
|
||||
else
|
||||
aVariant = node->Desc;
|
||||
}
|
||||
else
|
||||
aVariant = node->Desc;
|
||||
aVariant = node->Desc;
|
||||
break;
|
||||
|
||||
default: // column == -1 is used for default Compare function
|
||||
|
|
Loading…
Reference in New Issue