Fix typo assuming new field value was always the name.

Fixes https://gitlab.com/kicad/code/kicad/issues/4936
This commit is contained in:
Jeff Young 2020-07-22 15:10:19 +01:00
parent 150c781f27
commit 864087890b
2 changed files with 11 additions and 3 deletions

View File

@ -321,13 +321,13 @@ private:
bool LoadOneLibraryPartAux( LIB_PART* aLibEntry, const wxString& aLibrary, int aUnit,
int aConvert );
public:
/**
* Display the documentation of the selected component.
*/
void DisplayCmpDoc();
// General editing
public:
/**
* Create a copy of the current component, and save it in the undo list.
*

View File

@ -503,10 +503,18 @@ 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->DisplayCmpDoc();
}
}
void LIB_EDIT_TOOL::editSymbolProperties()