summaryrefslogtreecommitdiffstats
path: root/application/MainWindow.cpp
diff options
context:
space:
mode:
authorjanrupf <werbung.janrupf@t-online.de>2019-06-17 16:45:32 +0200
committerPetr Mrázek <peterix@gmail.com>2019-06-21 23:55:16 +0200
commit1ed84eddd53cfd7e21b96a2f5e55e07d448e2482 (patch)
treee80122a21dd5eb104cfb174af09287aeef4e4e12 /application/MainWindow.cpp
parentce12f1a734e08f1653aa482279a4dc6b6f3667eb (diff)
downloadMultiMC-1ed84eddd53cfd7e21b96a2f5e55e07d448e2482.tar
MultiMC-1ed84eddd53cfd7e21b96a2f5e55e07d448e2482.tar.gz
MultiMC-1ed84eddd53cfd7e21b96a2f5e55e07d448e2482.tar.lz
MultiMC-1ed84eddd53cfd7e21b96a2f5e55e07d448e2482.tar.xz
MultiMC-1ed84eddd53cfd7e21b96a2f5e55e07d448e2482.zip
GH-2515 Save instance ID before display dialog
Diffstat (limited to 'application/MainWindow.cpp')
-rw-r--r--application/MainWindow.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/application/MainWindow.cpp b/application/MainWindow.cpp
index bec57c0d..ca0b443d 100644
--- a/application/MainWindow.cpp
+++ b/application/MainWindow.cpp
@@ -1664,6 +1664,7 @@ void MainWindow::on_actionDeleteInstance_triggered()
{
return;
}
+ auto id = m_selectedInstance->id();
auto response = CustomMessageBox::selectable(
this,
tr("CAREFUL!"),
@@ -1674,7 +1675,7 @@ void MainWindow::on_actionDeleteInstance_triggered()
)->exec();
if (response == QMessageBox::Yes)
{
- MMC->instances()->deleteInstance(m_selectedInstance->id());
+ MMC->instances()->deleteInstance(id);
}
}