Eeschema, DIALOG_EDIT_ONE_FIELD: fix incorrect behavior for footprint field,

when initialized from the footprint viewer.

Fixes #4609
https://gitlab.com/kicad/code/kicad/issues/4609
This commit is contained in:
jean-pierre charras 2020-06-04 18:47:12 +02:00
parent 7876bab0e0
commit a29b3eb017
2 changed files with 5 additions and 2 deletions

View File

@ -143,7 +143,10 @@ void DIALOG_EDIT_ONE_FIELD::OnTextValueSelectButtonClick( wxCommandEvent& aEvent
if( frame->ShowModal( &fpid, this ) ) if( frame->ShowModal( &fpid, this ) )
{ {
m_TextCtrl->SetValue( fpid ); if( m_StyledTextCtrl->IsShown() )
m_StyledTextCtrl->SetValue( fpid );
else
m_TextCtrl->SetValue( fpid );
} }
frame->Destroy(); frame->Destroy();

View File

@ -980,7 +980,7 @@ void DIALOG_PAD_PROPERTIES::OnUpdateUI( wxUpdateUIEvent& event )
m_rbCopperLayersSel->Enable( ii != 4 ); m_rbCopperLayersSel->Enable( ii != 4 );
// Adjust for any shown/hidden elements // Adjust for any shown/hidden elements
for( int i = 0; i < m_notebook->GetPageCount(); ++i ) for( size_t i = 0; i < m_notebook->GetPageCount(); ++i )
m_notebook->GetPage( i )->Layout(); m_notebook->GetPage( i )->Layout();
} }