diff --git a/eeschema/dialogs/dialog_edit_component_in_lib.cpp b/eeschema/dialogs/dialog_edit_component_in_lib.cpp index a1de975fcf..85326c7e8f 100644 --- a/eeschema/dialogs/dialog_edit_component_in_lib.cpp +++ b/eeschema/dialogs/dialog_edit_component_in_lib.cpp @@ -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. diff --git a/eeschema/libedit/libedit.cpp b/eeschema/libedit/libedit.cpp index 6cf487dfca..aee1505f05 100644 --- a/eeschema/libedit/libedit.cpp +++ b/eeschema/libedit/libedit.cpp @@ -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() ); diff --git a/eeschema/tools/lib_edit_tool.cpp b/eeschema/tools/lib_edit_tool.cpp index 61e158f3c2..7abb0896d5 100644 --- a/eeschema/tools/lib_edit_tool.cpp +++ b/eeschema/tools/lib_edit_tool.cpp @@ -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 ); }