From defb5d51cc342e3c067841cdac601205c3cf265d Mon Sep 17 00:00:00 2001 From: spiros Date: Tue, 18 Jun 2024 22:43:20 +0300 Subject: [PATCH] Fix bug with cyclic view and a single button --- src/mainwindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 8666729..7f31e9e 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -112,7 +112,7 @@ void MainWindow::onPrevButtonClicked() void MainWindow::updateNavigationButtons(int currentIndex) { - prevButton->setEnabled(currentIndex > 0||ui->actionCyclic_Navigation->isChecked()); // We can use setVisible if we want to mimic CrystalDiskInfo + prevButton->setEnabled(currentIndex > 0||(ui->actionCyclic_Navigation->isChecked() && buttonGroup->buttons().size() > 1)); // We can use setVisible if we want to mimic CrystalDiskInfo nextButton->setEnabled(currentIndex < buttonGroup->buttons().size() - 1||ui->actionCyclic_Navigation->isChecked()); }