diff options
author | Petr Mrázek <peterix@gmail.com> | 2015-05-02 12:07:18 +0200 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2015-05-02 12:07:18 +0200 |
commit | 55f9117ce3c3ea41c8537938a8fc8199ea44110e (patch) | |
tree | bbc7014e8e9edea8ed9e48ffb44a6f79859abc40 | |
parent | 994c815bb972223bc1763ce806ab903f70b537fe (diff) | |
download | MultiMC-55f9117ce3c3ea41c8537938a8fc8199ea44110e.tar MultiMC-55f9117ce3c3ea41c8537938a8fc8199ea44110e.tar.gz MultiMC-55f9117ce3c3ea41c8537938a8fc8199ea44110e.tar.lz MultiMC-55f9117ce3c3ea41c8537938a8fc8199ea44110e.tar.xz MultiMC-55f9117ce3c3ea41c8537938a8fc8199ea44110e.zip |
NOISSUE do not remake instance tools menu, refill it instead
-rw-r--r-- | application/MainWindow.cpp | 11 |
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(); }); |