From 7de612dd921a07904407728158b7bfc2621b6392 Mon Sep 17 00:00:00 2001 From: Tristan <47175750+FFATristan@users.noreply.github.com> Date: Thu, 31 Jan 2019 10:45:06 +0000 Subject: [PATCH] Honour wxCB_READONLY flag in wxQt wxComboBox Don't make the combobox unconditionally editable, but only do this if wxCB_READONLY is not specified. Closes https://github.com/wxWidgets/wxWidgets/pull/1207 --- 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 36685b1954..73a44dd770 100644 --- a/src/qt/combobox.cpp +++ b/src/qt/combobox.cpp @@ -55,7 +55,6 @@ wxQtComboBox::wxQtComboBox( wxWindow *parent, wxComboBox *handler ) : wxQtEventSignalHandler< QComboBox, wxComboBox >( parent, handler ), m_textChangeIgnored( false ) { - setEditable( true ); connect(this, static_cast(&QComboBox::activated), this, &wxQtComboBox::activated); connect(this, &QComboBox::editTextChanged, @@ -160,6 +159,7 @@ bool wxComboBox::Create(wxWindow *parent, wxWindowID id, const wxString& name ) { m_qtComboBox = new wxQtComboBox( parent, this ); + m_qtComboBox->setEditable(!(style & wxCB_READONLY)); QtInitSort( m_qtComboBox ); while ( n-- > 0 )