Qt: Ensure frame size options stay checked
Jeffrey Pfau jeffrey@endrift.com
Fri, 07 Aug 2015 20:26:19 -0700
1 files changed,
4 insertions(+),
1 deletions(-)
jump to
M
src/platform/qt/Window.cpp
→
src/platform/qt/Window.cpp
@@ -939,9 +939,12 @@ m_shortcutController->addMenu(frameMenu, avMenu);
for (int i = 1; i <= 6; ++i) { QAction* setSize = new QAction(tr("%1x").arg(QString::number(i)), avMenu); setSize->setCheckable(true); - connect(setSize, &QAction::triggered, [this, i]() { + connect(setSize, &QAction::triggered, [this, i, setSize]() { showNormal(); resizeFrame(VIDEO_HORIZONTAL_PIXELS * i, VIDEO_VERTICAL_PIXELS * i); + bool enableSignals = setSize->blockSignals(true); + setSize->setChecked(true); + setSize->blockSignals(enableSignals); }); m_frameSizes[i] = setSize; addControlledAction(frameMenu, setSize, QString("frame%1x").arg(QString::number(i)));