all repos — mgba @ 72fd09dbc977a2d56ebafdad4c0ffdb9fcfebb9f

mGBA Game Boy Advance Emulator

Qt: Fix radio button unchecking in Video UI
Jeffrey Pfau jeffrey@endrift.com
Wed, 12 Nov 2014 01:47:46 -0800
commit

72fd09dbc977a2d56ebafdad4c0ffdb9fcfebb9f

parent

61cfdbaccba2aaef410def9a392bfff877102333

1 files changed, 8 insertions(+), 0 deletions(-)

jump to
M src/platform/qt/VideoView.cppsrc/platform/qt/VideoView.cpp

@@ -318,6 +318,8 @@ .width = m_width,

.height = m_height }; + m_ui.presets->setExclusive(false); + m_ui.resolutions->setExclusive(false); for (auto iterator = m_presets.constBegin(); iterator != m_presets.constEnd(); ++iterator) { Preset next = *iterator; next.container = sanitizeCodec(next.container, s_containerMap);

@@ -327,6 +329,9 @@ if (!current.compatible(next)) {

safelyCheck(iterator.key(), false); } } + m_ui.presets->setExclusive(true); + m_ui.resolutions->setExclusive(true); + if (current.compatible(m_presets[m_ui.preset160])) { safelyCheck(m_ui.preset160); }

@@ -352,7 +357,10 @@ }

void VideoView::safelyCheck(QAbstractButton* button, bool set) { bool signalsBlocked = button->blockSignals(true); + bool autoExclusive = button->autoExclusive(); + button->setAutoExclusive(false); button->setChecked(set); + button->setAutoExclusive(autoExclusive); button->blockSignals(signalsBlocked); }