diff options
author | Petr Mrázek <peterix@gmail.com> | 2019-07-15 01:07:21 +0200 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2019-07-15 01:07:21 +0200 |
commit | 80b3efff11a34e2df7d1bc4cc3187e6aaf57e687 (patch) | |
tree | 0e09e162ccc24decf6e10397b2fb3963da1d364d /api/logic/minecraft/MinecraftInstance.cpp | |
parent | e4273d6a174ffb771728f32b5e2a8a36096c4e21 (diff) | |
download | MultiMC-80b3efff11a34e2df7d1bc4cc3187e6aaf57e687.tar MultiMC-80b3efff11a34e2df7d1bc4cc3187e6aaf57e687.tar.gz MultiMC-80b3efff11a34e2df7d1bc4cc3187e6aaf57e687.tar.lz MultiMC-80b3efff11a34e2df7d1bc4cc3187e6aaf57e687.tar.xz MultiMC-80b3efff11a34e2df7d1bc4cc3187e6aaf57e687.zip |
NOISSUE Do not hide mods list pages when the instance is running.
Instead, disable (most of) the controls.
Diffstat (limited to 'api/logic/minecraft/MinecraftInstance.cpp')
-rw-r--r-- | api/logic/minecraft/MinecraftInstance.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/api/logic/minecraft/MinecraftInstance.cpp b/api/logic/minecraft/MinecraftInstance.cpp index 35f692c4..617d7431 100644 --- a/api/logic/minecraft/MinecraftInstance.cpp +++ b/api/logic/minecraft/MinecraftInstance.cpp @@ -897,8 +897,9 @@ std::shared_ptr<SimpleModList> MinecraftInstance::loaderModList() const if (!m_loader_mod_list) { m_loader_mod_list.reset(new SimpleModList(loaderModsDir())); + m_loader_mod_list->disableInteraction(isRunning()); + connect(this, &BaseInstance::runningStatusChanged, m_loader_mod_list.get(), &SimpleModList::disableInteraction); } - m_loader_mod_list->update(); return m_loader_mod_list; } @@ -907,8 +908,9 @@ std::shared_ptr<SimpleModList> MinecraftInstance::coreModList() const if (!m_core_mod_list) { m_core_mod_list.reset(new SimpleModList(coreModsDir())); + m_core_mod_list->disableInteraction(isRunning()); + connect(this, &BaseInstance::runningStatusChanged, m_core_mod_list.get(), &SimpleModList::disableInteraction); } - m_core_mod_list->update(); return m_core_mod_list; } @@ -917,8 +919,9 @@ std::shared_ptr<SimpleModList> MinecraftInstance::resourcePackList() const if (!m_resource_pack_list) { m_resource_pack_list.reset(new SimpleModList(resourcePacksDir())); + m_resource_pack_list->disableInteraction(isRunning()); + connect(this, &BaseInstance::runningStatusChanged, m_resource_pack_list.get(), &SimpleModList::disableInteraction); } - m_resource_pack_list->update(); return m_resource_pack_list; } @@ -927,8 +930,9 @@ std::shared_ptr<SimpleModList> MinecraftInstance::texturePackList() const if (!m_texture_pack_list) { m_texture_pack_list.reset(new SimpleModList(texturePacksDir())); + m_texture_pack_list->disableInteraction(isRunning()); + connect(this, &BaseInstance::runningStatusChanged, m_texture_pack_list.get(), &SimpleModList::disableInteraction); } - m_texture_pack_list->update(); return m_texture_pack_list; } |