From c2270f8a833276df72590bc26369509c513f9129 Mon Sep 17 00:00:00 2001 From: Graham Dawes Date: Tue, 22 Jan 2019 08:27:27 +0000 Subject: [PATCH] Don't generate events in wxChoice::SetSelection() under wxQt This makes it consistent with the other ports and makes the corresponding unit test pass. Closes https://github.com/wxWidgets/wxWidgets/pull/1163 --- src/qt/choice.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/qt/choice.cpp b/src/qt/choice.cpp index 491398b718..da605c67ba 100644 --- a/src/qt/choice.cpp +++ b/src/qt/choice.cpp @@ -170,7 +170,9 @@ void wxChoice::SetString(unsigned int n, const wxString& s) void wxChoice::SetSelection(int n) { + m_qtComboBox->blockSignals(true); m_qtComboBox->setCurrentIndex(n); + m_qtComboBox->blockSignals(false); } int wxChoice::GetSelection() const