From e32306c232e908694db619c0cba71afc9e2e1600 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 --- 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 76a287b9df..8d38c3a93e 100644 --- a/eeschema/dialogs/dialog_edit_one_field.cpp +++ b/eeschema/dialogs/dialog_edit_one_field.cpp @@ -122,6 +122,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