Fix issue where disksGroup actions were not being cleared

This commit is contained in:
Spiros
2025-04-23 15:16:12 +03:00
parent 49c43a002c
commit 91240c40b5

View File

@@ -177,6 +177,13 @@ void MainWindow::updateUI()
bool firstTime = true;
globalIsNvme = false;
QList<QAction*> 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();