Update value field when changing power symbol reference.

Fixes: lp:1765932
* https://bugs.launchpad.net/kicad/+bug/1765932
This commit is contained in:
Jeff Young 2018-04-25 00:35:37 +01:00
parent 7e29ff0bc4
commit 4b3772cf07
1 changed files with 13 additions and 0 deletions

View File

@ -300,6 +300,19 @@ void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::OnSelectChipName( wxCommandEvent& event
return;
chipnameTextCtrl->SetValue( sel.LibId.Format() );
// Update the value field for Power symbols
LIB_PART* entry = GetParent()->GetLibPart( sel.LibId );
if( entry && entry->IsPower() )
{
m_FieldsBuf[VALUE].SetText( sel.LibId.GetLibItemName() );
setRowItem( VALUE, m_FieldsBuf[VALUE] );
if( s_SelectedRow == VALUE )
copySelectedFieldToPanel();
}
}