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
This commit is contained in:
Graham Dawes 2019-01-22 08:27:27 +00:00 committed by Vadim Zeitlin
parent 31c2bd7aa3
commit c2270f8a83

View File

@ -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