summaryrefslogtreecommitdiffstats
path: root/application
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2015-05-02 12:07:18 +0200
committerPetr Mrázek <peterix@gmail.com>2015-05-02 12:07:18 +0200
commit55f9117ce3c3ea41c8537938a8fc8199ea44110e (patch)
treebbc7014e8e9edea8ed9e48ffb44a6f79859abc40 /application
parent994c815bb972223bc1763ce806ab903f70b537fe (diff)
downloadMultiMC-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
Diffstat (limited to 'application')
-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(); });