Make sure UI gets adjusted for Symbol property changes.
For instance, if the number of units is changed from 1 to not-1 or vice versa then we need to rebuild the units selector. Fixes https://gitlab.com/kicad/code/kicad/issues/4622
This commit is contained in:
parent
20ca836ab3
commit
e8079bf655
|
@ -341,10 +341,7 @@ bool DIALOG_EDIT_COMPONENT_IN_LIBRARY::TransferDataFromWindow()
|
|||
|
||||
m_libEntry->SetFootprintFilters( m_FootprintFilterListBox->GetStrings() );
|
||||
|
||||
if( oldName != newName )
|
||||
m_Parent->UpdateAfterSymbolProperties( &oldName );
|
||||
else
|
||||
m_Parent->RebuildView();
|
||||
m_Parent->UpdateAfterSymbolProperties( &oldName );
|
||||
|
||||
// It's possible that the symbol being edited has no pins, in which case there may be no
|
||||
// alternate body style objects causing #LIB_PART::HasCoversion() to always return false.
|
||||
|
|
|
@ -526,11 +526,13 @@ void LIB_EDIT_FRAME::UpdateAfterSymbolProperties( wxString* aOldName )
|
|||
m_my_part->SetName( *aOldName );
|
||||
}
|
||||
else
|
||||
{
|
||||
m_libMgr->UpdatePartAfterRename( m_my_part, *aOldName, lib );
|
||||
}
|
||||
}
|
||||
|
||||
// Reselect the renamed part
|
||||
m_treePane->GetLibTree()->SelectLibId( LIB_ID( lib, m_my_part->GetName() ) );
|
||||
// Reselect the renamed part
|
||||
m_treePane->GetLibTree()->SelectLibId( LIB_ID( lib, m_my_part->GetName() ) );
|
||||
}
|
||||
|
||||
RebuildSymbolUnitsList();
|
||||
SetShowDeMorgan( GetCurPart()->Flatten()->HasConversion() );
|
||||
|
|
|
@ -503,16 +503,9 @@ void LIB_EDIT_TOOL::editFieldProperties( LIB_FIELD* aField )
|
|||
dlg.UpdateField( aField );
|
||||
|
||||
if( renamed )
|
||||
{
|
||||
parent->SetName( newFieldValue );
|
||||
m_frame->UpdateAfterSymbolProperties( &oldFieldValue );
|
||||
}
|
||||
else
|
||||
{
|
||||
updateView( aField );
|
||||
m_frame->GetCanvas()->Refresh();
|
||||
m_frame->OnModify( );
|
||||
}
|
||||
|
||||
m_frame->UpdateAfterSymbolProperties( &oldFieldValue );
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue