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
06bde527d5
commit
713a296a59
|
@ -1084,7 +1084,19 @@ void LIB_EDIT_FRAME::OnEditComponentProperties( wxCommandEvent& event )
|
|||
m_libMgr->UpdatePart( GetCurPart(), GetCurLib() );
|
||||
|
||||
if( oldAliases != GetCurPart()->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 : GetCurPart()->GetAliases() )
|
||||
{
|
||||
wxDataViewItem item = m_libMgr->GetAdapter()->FindItem( alias->GetLibId() );
|
||||
static_cast<LIB_TREE_NODE_LIB_ID*>( item.GetID() )->Update( alias );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
UpdatePartSelectList();
|
||||
|
|
|
@ -232,22 +232,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
|
||||
// However should not happen, but happens.
|
||||
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