From d5440d60ab8f91ba97c8558a3b36a9b36ce0a3ca Mon Sep 17 00:00:00 2001 From: Ian McInerney Date: Mon, 1 Jul 2019 22:22:28 +0100 Subject: [PATCH] eeschema: Fix initial selected text in reference value dialog Fixes: lp:1834741 * https://bugs.launchpad.net/kicad/+bug/1834741 (cherry picked from commit e32306c232e908694db619c0cba71afc9e2e1600) --- eeschema/dialogs/dialog_edit_one_field.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/eeschema/dialogs/dialog_edit_one_field.cpp b/eeschema/dialogs/dialog_edit_one_field.cpp index 43e089cc37..a50128a6b2 100644 --- a/eeschema/dialogs/dialog_edit_one_field.cpp +++ b/eeschema/dialogs/dialog_edit_one_field.cpp @@ -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( m_TextValue ) ); else