aboutsummaryrefslogtreecommitdiff
path: root/launcher/ui/pages/instance/ModFolderPage.cpp
diff options
context:
space:
mode:
authorflow <flowlnlnln@gmail.com>2022-08-13 11:58:39 -0300
committerflow <flowlnlnln@gmail.com>2022-08-20 10:49:54 -0300
commite2ab2aea32b6d48ee0c9f90442ed53c47e2e7d96 (patch)
tree76c2c9cb6ea122f497aee22e844500ae1037c84d /launcher/ui/pages/instance/ModFolderPage.cpp
parentc3ceefbafbbeb3d31630ef329405ebaacdf9fce5 (diff)
downloadPrismLauncher-e2ab2aea32b6d48ee0c9f90442ed53c47e2e7d96.tar.gz
PrismLauncher-e2ab2aea32b6d48ee0c9f90442ed53c47e2e7d96.tar.bz2
PrismLauncher-e2ab2aea32b6d48ee0c9f90442ed53c47e2e7d96.zip
change: add enable/disable to resources
TIL that zip resource packs, when disabled, actually have the effect of not showing up in the game at all. Since this can be useful to someone, I moved the logic for it to the resources. Signed-off-by: flow <flowlnlnln@gmail.com>
Diffstat (limited to 'launcher/ui/pages/instance/ModFolderPage.cpp')
-rw-r--r--launcher/ui/pages/instance/ModFolderPage.cpp29
1 files changed, 0 insertions, 29 deletions
diff --git a/launcher/ui/pages/instance/ModFolderPage.cpp b/launcher/ui/pages/instance/ModFolderPage.cpp
index 63897fb0..75b40e77 100644
--- a/launcher/ui/pages/instance/ModFolderPage.cpp
+++ b/launcher/ui/pages/instance/ModFolderPage.cpp
@@ -110,8 +110,6 @@ ModFolderPage::ModFolderPage(BaseInstance* inst, std::shared_ptr<ModFolderModel>
ModFolderPage::runningStateChanged(m_instance && m_instance->isRunning());
}
-
- connect(ui->treeView, &ModListView::activated, this, &ModFolderPage::itemActivated);
}
void ModFolderPage::runningStateChanged(bool running)
@@ -126,33 +124,6 @@ bool ModFolderPage::shouldDisplay() const
return true;
}
-void ModFolderPage::itemActivated(const QModelIndex&)
-{
- if (!m_controlsEnabled)
- return;
-
- auto selection = m_filterModel->mapSelectionToSource(ui->treeView->selectionModel()->selection());
- m_model->setModStatus(selection.indexes(), ModFolderModel::Toggle);
-}
-
-void ModFolderPage::enableItem()
-{
- if (!m_controlsEnabled)
- return;
-
- auto selection = m_filterModel->mapSelectionToSource(ui->treeView->selectionModel()->selection());
- m_model->setModStatus(selection.indexes(), ModFolderModel::Enable);
-}
-
-void ModFolderPage::disableItem()
-{
- if (!m_controlsEnabled)
- return;
-
- auto selection = m_filterModel->mapSelectionToSource(ui->treeView->selectionModel()->selection());
- m_model->setModStatus(selection.indexes(), ModFolderModel::Disable);
-}
-
bool ModFolderPage::onSelectionChanged(const QModelIndex& current, const QModelIndex& previous)
{
auto sourceCurrent = m_filterModel->mapToSource(current);