eeschema: Fix initial selected text in reference value dialog

Fixes: lp:1834741
* https://bugs.launchpad.net/kicad/+bug/1834741

(cherry picked from commit e32306c232)
This commit is contained in:
Ian McInerney 2019-07-01 22:22:28 +01:00 committed by Wayne Stambaugh
parent 2ba237ec12
commit d5440d60ab
1 changed files with 5 additions and 0 deletions

View File

@ -151,6 +151,11 @@ void DIALOG_EDIT_ONE_FIELD::OnTextValueSelectButtonClick( wxCommandEvent& aEvent
void DIALOG_EDIT_ONE_FIELD::OnSetFocusText( wxFocusEvent& event )
{
// Force an update of the text control before setting the text selection
// This is needed because GTK seems to ignore the selection on first update
m_TextValue->Update();
if( m_fieldId == REFERENCE )
SelectReferenceNumber( static_cast<wxTextEntry*>( m_TextValue ) );
else