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();