diff options
author | Petr Mrázek <peterix@gmail.com> | 2016-03-18 15:02:54 +0100 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2016-03-26 17:05:27 +0100 |
commit | b7d8e512f4184a755809fe9a964a04921f8abf7c (patch) | |
tree | 2d67f30a2c57743dac5fc9dc819e6c5d58b41962 /application | |
parent | fb9dfcb951d9cf9c19fc868703cb66e15aa9a1e6 (diff) | |
download | MultiMC-b7d8e512f4184a755809fe9a964a04921f8abf7c.tar MultiMC-b7d8e512f4184a755809fe9a964a04921f8abf7c.tar.gz MultiMC-b7d8e512f4184a755809fe9a964a04921f8abf7c.tar.lz MultiMC-b7d8e512f4184a755809fe9a964a04921f8abf7c.tar.xz MultiMC-b7d8e512f4184a755809fe9a964a04921f8abf7c.zip |
NOISSUE Use patch problems and problem levels instead of exceptions for minecraft profiles.
Diffstat (limited to 'application')
-rw-r--r-- | application/MainWindow.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/application/MainWindow.cpp b/application/MainWindow.cpp index 4fc4d173..1633cc39 100644 --- a/application/MainWindow.cpp +++ b/application/MainWindow.cpp @@ -1529,6 +1529,10 @@ void MainWindow::on_actionLaunchInstanceOffline_triggered() void MainWindow::launch(InstancePtr instance, bool online, BaseProfilerFactory *profiler) { + if(!instance->canLaunch()) + { + return; + } m_launchController.reset(new LaunchController()); m_launchController->setInstance(instance); m_launchController->setOnline(online); @@ -1565,7 +1569,9 @@ void MainWindow::instanceChanged(const QModelIndex ¤t, const QModelIndex & m_selectedInstance = MMC->instances()->getInstanceById(id); if (m_selectedInstance) { - ui->instanceToolBar->setEnabled(m_selectedInstance->canLaunch()); + ui->instanceToolBar->setEnabled(true); + ui->actionLaunchInstance->setEnabled(m_selectedInstance->canLaunch()); + ui->actionLaunchInstanceOffline->setEnabled(m_selectedInstance->canLaunch()); renameButton->setText(m_selectedInstance->name()); m_statusLeft->setText(m_selectedInstance->getStatusbarDescription()); updateInstanceToolIcon(m_selectedInstance->iconKey()); @@ -1576,6 +1582,7 @@ void MainWindow::instanceChanged(const QModelIndex ¤t, const QModelIndex & } else { + ui->instanceToolBar->setEnabled(false); MMC->settings()->set("SelectedInstance", QString()); selectionBad(); return; |