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() );
|
m_libEntry->SetFootprintFilters( m_FootprintFilterListBox->GetStrings() );
|
||||||
|
|
||||||
if( oldName != newName )
|
m_Parent->UpdateAfterSymbolProperties( &oldName );
|
||||||
m_Parent->UpdateAfterSymbolProperties( &oldName );
|
|
||||||
else
|
|
||||||
m_Parent->RebuildView();
|
|
||||||
|
|
||||||
// It's possible that the symbol being edited has no pins, in which case there may be no
|
// 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.
|
// 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 );
|
m_my_part->SetName( *aOldName );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
m_libMgr->UpdatePartAfterRename( m_my_part, *aOldName, lib );
|
m_libMgr->UpdatePartAfterRename( m_my_part, *aOldName, lib );
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reselect the renamed part
|
// Reselect the renamed part
|
||||||
m_treePane->GetLibTree()->SelectLibId( LIB_ID( lib, m_my_part->GetName() ) );
|
m_treePane->GetLibTree()->SelectLibId( LIB_ID( lib, m_my_part->GetName() ) );
|
||||||
|
}
|
||||||
|
|
||||||
RebuildSymbolUnitsList();
|
RebuildSymbolUnitsList();
|
||||||
SetShowDeMorgan( GetCurPart()->Flatten()->HasConversion() );
|
SetShowDeMorgan( GetCurPart()->Flatten()->HasConversion() );
|
||||||
|
|
|
@ -503,16 +503,9 @@ void LIB_EDIT_TOOL::editFieldProperties( LIB_FIELD* aField )
|
||||||
dlg.UpdateField( aField );
|
dlg.UpdateField( aField );
|
||||||
|
|
||||||
if( renamed )
|
if( renamed )
|
||||||
{
|
|
||||||
parent->SetName( newFieldValue );
|
parent->SetName( newFieldValue );
|
||||||
m_frame->UpdateAfterSymbolProperties( &oldFieldValue );
|
|
||||||
}
|
m_frame->UpdateAfterSymbolProperties( &oldFieldValue );
|
||||||
else
|
|
||||||
{
|
|
||||||
updateView( aField );
|
|
||||||
m_frame->GetCanvas()->Refresh();
|
|
||||||
m_frame->OnModify( );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue