1
0
mirror of https://github.com/TomHarte/CLK.git synced 2026-03-11 04:42:20 +00:00

Qt: don't allow display types to be deselected.

This commit is contained in:
Thomas Harte
2026-02-11 21:28:21 -05:00
parent b8ec3d5ff3
commit 754a463b38

View File

@@ -414,7 +414,6 @@ void MainWindow::launchMachine() {
return std::find(allDisplayValues.begin(), allDisplayValues.end(), name) != allDisplayValues.end();
};
const bool hasCompositeColour = contains(Configurable::Display::CompositeColour);
const bool hasCompositeMonochrome = contains(Configurable::Display::CompositeMonochrome);
const bool hasSVideo = contains(Configurable::Display::SVideo);
@@ -554,7 +553,7 @@ void MainWindow::addDisplayMenu(
action->setChecked(displaySelection == defaultDisplay);
connect(action, &QAction::triggered, this, [=, this] {
for(auto otherAction: {compositeColourAction, compositeMonochromeAction, sVideoAction, rgbAction}) {
if(otherAction && otherAction != action) otherAction->setChecked(false);
if(otherAction) otherAction->setChecked(otherAction == action);
}
Settings settings;