summaryrefslogtreecommitdiffstats
path: root/application/LaunchController.cpp
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2016-10-30 02:37:38 +0100
committerPetr Mrázek <peterix@gmail.com>2016-10-30 02:37:38 +0100
commit412855ae3d967ff81a383688397c4d9448a4ee15 (patch)
tree78d6225067f39a2696dfb9ca0d40eaed237fe9ee /application/LaunchController.cpp
parentdeabfa78f8e66d1af40d0ecfd787d034cffd5431 (diff)
downloadMultiMC-412855ae3d967ff81a383688397c4d9448a4ee15.tar
MultiMC-412855ae3d967ff81a383688397c4d9448a4ee15.tar.gz
MultiMC-412855ae3d967ff81a383688397c4d9448a4ee15.tar.lz
MultiMC-412855ae3d967ff81a383688397c4d9448a4ee15.tar.xz
MultiMC-412855ae3d967ff81a383688397c4d9448a4ee15.zip
NOISSUE refactor window management and launch, make MultiMC a single instance application.
Diffstat (limited to 'application/LaunchController.cpp')
-rw-r--r--application/LaunchController.cpp17
1 files changed, 3 insertions, 14 deletions
diff --git a/application/LaunchController.cpp b/application/LaunchController.cpp
index bc7f976a..4dce6708 100644
--- a/application/LaunchController.cpp
+++ b/application/LaunchController.cpp
@@ -205,21 +205,10 @@ void LaunchController::launchInstance()
return;
}
- auto mainWindow = qobject_cast<MainWindow *>(m_parentWidget);
- auto instanceWindow = qobject_cast<InstanceWindow *>(m_parentWidget);
- if(mainWindow)
+ auto console = qobject_cast<InstanceWindow *>(m_parentWidget);
+ if(!console)
{
- m_console = mainWindow->showInstanceWindow(m_instance);
- }
- else if(instanceWindow)
- {
- // NOOP
- }
- else
- {
- // this is used when launching directly from command line
- m_console = new InstanceWindow(m_instance);
- m_console->setQuitOnClose(true);
+ MMC->showInstanceWindow(m_instance);
}
connect(m_launcher.get(), &LaunchTask::readyForLaunch, this, &LaunchController::readyForLaunch);