From 121336a3d88921eddcfdecc8c6abefc614a05df6 Mon Sep 17 00:00:00 2001 From: Liam Treacy Date: Mon, 9 Sep 2019 15:15:03 +0100 Subject: [PATCH] Fix setting the initial value of non-editable wxComboBox in wxQt Use setCurrentText(), which works for non-editable combo boxes as well as for editable ones, instead of setEditText(), which only works for the latter ones. Closes https://github.com/wxWidgets/wxWidgets/pull/1542 --- src/qt/combobox.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qt/combobox.cpp b/src/qt/combobox.cpp index af5846384d..c9d6abe430 100644 --- a/src/qt/combobox.cpp +++ b/src/qt/combobox.cpp @@ -167,7 +167,7 @@ bool wxComboBox::Create(wxWindow *parent, wxWindowID id, while ( n-- > 0 ) m_qtComboBox->addItem( wxQtConvertString( *choices++ )); - m_qtComboBox->setEditText( wxQtConvertString( value )); + m_qtComboBox->setCurrentText( wxQtConvertString( value )); return QtCreateControl( parent, id, pos, size, style, validator, name ); }