summaryrefslogtreecommitdiffstats
path: root/api/logic
diff options
context:
space:
mode:
Diffstat (limited to 'api/logic')
-rw-r--r--api/logic/minecraft/ModList.cpp11
-rw-r--r--api/logic/minecraft/ModList.h3
2 files changed, 14 insertions, 0 deletions
diff --git a/api/logic/minecraft/ModList.cpp b/api/logic/minecraft/ModList.cpp
index 36371ee3..ad588f16 100644
--- a/api/logic/minecraft/ModList.cpp
+++ b/api/logic/minecraft/ModList.cpp
@@ -199,6 +199,17 @@ bool ModList::deleteMods(int first, int last)
return true;
}
+bool ModList::deleteMods(const QVector<int> &indexes)
+{
+ for (auto i: indexes)
+ {
+ Mod &m = mods[i];
+ m.destroy();
+ }
+ emit changed();
+ return true;
+}
+
int ModList::columnCount(const QModelIndex &parent) const
{
return 3;
diff --git a/api/logic/minecraft/ModList.h b/api/logic/minecraft/ModList.h
index 1a42c8f8..24dcdaa4 100644
--- a/api/logic/minecraft/ModList.h
+++ b/api/logic/minecraft/ModList.h
@@ -89,6 +89,9 @@ public:
/// Deletes all the selected mods
virtual bool deleteMods(int first, int last);
+ /// Deletes all the selected mods
+ virtual bool deleteMods(const QVector<int> &indexes);
+
void startWatching();
void stopWatching();