From 358d11f2f557503e9ed88817027191d768c2444b Mon Sep 17 00:00:00 2001 From: Johannes Winkler Date: Tue, 19 Dec 2023 10:34:59 +0100 Subject: [PATCH] fixed shortcut 4,5. radio can only be checked if enabled --- mainwindow.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mainwindow.cpp b/mainwindow.cpp index 8219eb7..8011d33 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -33,8 +33,8 @@ MainWindow::MainWindow(QWidget *parent) connect(&num1, &QAction::triggered, [=](){ this->ui->radio_sprite_left->setChecked(true); }); connect(&num2, &QAction::triggered, [=](){ this->ui->radio_mc1_left->setChecked(true); }); connect(&num3, &QAction::triggered, [=](){ this->ui->radio_mc2_left->setChecked(true); }); - connect(&num4, &QAction::triggered, [=](){ this->ui->radio_overlay_color_left->setChecked(true); }); - connect(&num5, &QAction::triggered, [=](){ this->ui->radio_overlay_transparent_left->setChecked(true); }); + connect(&num4, &QAction::triggered, [=](){ if (this->ui->radio_overlay_color_left->isEnabled()) this->ui->radio_overlay_color_left->setChecked(true); }); + connect(&num5, &QAction::triggered, [=](){ if (this->ui->radio_overlay_transparent_left->isEnabled())this->ui->radio_overlay_transparent_left->setChecked(true); }); connect(this->ui->graphicsView, &SpriteView::zoom_in, this, [=](){ this->ui->slider_scale->setValue(this->ui->slider_scale->value()+10);});