summaryrefslogtreecommitdiffstats
path: root/application/MainWindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'application/MainWindow.cpp')
-rw-r--r--application/MainWindow.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/application/MainWindow.cpp b/application/MainWindow.cpp
index 2cd7b689..055a38c9 100644
--- a/application/MainWindow.cpp
+++ b/application/MainWindow.cpp
@@ -707,11 +707,16 @@ void MainWindow::showInstanceContextMenu(const QPoint &pos)
void MainWindow::updateToolsMenu()
{
- if (ui->actionLaunchInstance->menu())
+ QMenu *launchMenu = ui->actionLaunchInstance->menu();
+ if(launchMenu)
{
- ui->actionLaunchInstance->menu()->deleteLater();
+ launchMenu->clear();
}
- QMenu *launchMenu = new QMenu(this);
+ else
+ {
+ launchMenu = new QMenu(this);
+ }
+
QAction *normalLaunch = launchMenu->addAction(tr("Launch"));
connect(normalLaunch, &QAction::triggered, [this]()
{ doLaunch(); });