From 91240c40b56624744af6564632b54792545ae2de Mon Sep 17 00:00:00 2001 From: Spiros Date: Wed, 23 Apr 2025 15:16:12 +0300 Subject: [PATCH] Fix issue where disksGroup actions were not being cleared --- src/mainwindow.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 49d79cc..166e87d 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -177,6 +177,13 @@ void MainWindow::updateUI() bool firstTime = true; globalIsNvme = false; + QList oldActions = disksGroup->actions(); + for (QAction *action : std::as_const(oldActions)) { + disksGroup->removeAction(action); + menuDisk->removeAction(action); + delete action; + } + for (int i = 0; i < devices.size(); ++i) { QJsonObject device = devices[i].toObject(); QString deviceName = device["name"].toString();