summaryrefslogtreecommitdiffstats
path: root/application/pages/instance
diff options
context:
space:
mode:
Diffstat (limited to 'application/pages/instance')
-rw-r--r--application/pages/instance/ModFolderPage.cpp13
-rw-r--r--application/pages/instance/ModFolderPage.ui29
2 files changed, 30 insertions, 12 deletions
diff --git a/application/pages/instance/ModFolderPage.cpp b/application/pages/instance/ModFolderPage.cpp
index 9e987e95..d449f8bf 100644
--- a/application/pages/instance/ModFolderPage.cpp
+++ b/application/pages/instance/ModFolderPage.cpp
@@ -147,12 +147,13 @@ ModFolderPage::ModFolderPage(
connect(m_inst, &BaseInstance::runningStatusChanged, this, &ModFolderPage::on_RunningState_changed);
}
-void ModFolderPage::modItemActivated(const QModelIndex& index)
+void ModFolderPage::modItemActivated(const QModelIndex&)
{
- auto modsModelIndex = m_filterModel->mapToSource(index);
- if(modsModelIndex.isValid()) {
- m_mods->toggleEnabled(modsModelIndex);
+ if(!m_controlsEnabled) {
+ return;
}
+ auto selection = m_filterModel->mapSelectionToSource(ui->modTreeView->selectionModel()->selection());
+ m_mods->setModStatus(selection.indexes(), ModFolderModel::Toggle);
}
QMenu * ModFolderPage::createPopupMenu()
@@ -297,7 +298,7 @@ void ModFolderPage::on_actionEnable_triggered()
return;
}
auto selection = m_filterModel->mapSelectionToSource(ui->modTreeView->selectionModel()->selection());
- m_mods->enableMods(selection.indexes(), true);
+ m_mods->setModStatus(selection.indexes(), ModFolderModel::Enable);
}
void ModFolderPage::on_actionDisable_triggered()
@@ -306,7 +307,7 @@ void ModFolderPage::on_actionDisable_triggered()
return;
}
auto selection = m_filterModel->mapSelectionToSource(ui->modTreeView->selectionModel()->selection());
- m_mods->enableMods(selection.indexes(), false);
+ m_mods->setModStatus(selection.indexes(), ModFolderModel::Disable);
}
void ModFolderPage::on_actionRemove_triggered()
diff --git a/application/pages/instance/ModFolderPage.ui b/application/pages/instance/ModFolderPage.ui
index 55908bb5..052df602 100644
--- a/application/pages/instance/ModFolderPage.ui
+++ b/application/pages/instance/ModFolderPage.ui
@@ -87,6 +87,7 @@
<bool>false</bool>
</attribute>
<addaction name="actionAdd"/>
+ <addaction name="separator"/>
<addaction name="actionRemove"/>
<addaction name="actionEnable"/>
<addaction name="actionDisable"/>
@@ -95,27 +96,39 @@
</widget>
<action name="actionAdd">
<property name="text">
- <string>Add</string>
+ <string>&amp;Add</string>
+ </property>
+ <property name="toolTip">
+ <string>Add mods</string>
</property>
</action>
<action name="actionRemove">
<property name="text">
- <string>Remove</string>
+ <string>&amp;Remove</string>
+ </property>
+ <property name="toolTip">
+ <string>Remove selected mods</string>
</property>
</action>
<action name="actionEnable">
<property name="text">
- <string>Enable</string>
+ <string>&amp;Enable</string>
+ </property>
+ <property name="toolTip">
+ <string>Enable selected mods</string>
</property>
</action>
<action name="actionDisable">
<property name="text">
- <string>Disable</string>
+ <string>&amp;Disable</string>
+ </property>
+ <property name="toolTip">
+ <string>Disable selected mods</string>
</property>
</action>
<action name="actionView_configs">
<property name="text">
- <string>View configs</string>
+ <string>View &amp;Configs</string>
</property>
<property name="toolTip">
<string>Open the 'config' folder in the system file manager.</string>
@@ -123,7 +136,7 @@
</action>
<action name="actionView_Folder">
<property name="text">
- <string>View Folder</string>
+ <string>View &amp;Folder</string>
</property>
</action>
</widget>
@@ -145,6 +158,10 @@
<header>widgets/WideBar.h</header>
</customwidget>
</customwidgets>
+ <tabstops>
+ <tabstop>modTreeView</tabstop>
+ <tabstop>filterEdit</tabstop>
+ </tabstops>
<resources/>
<connections/>
</ui>