diff options
Diffstat (limited to 'api/logic/minecraft/ModList.cpp')
-rw-r--r-- | api/logic/minecraft/ModList.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/api/logic/minecraft/ModList.cpp b/api/logic/minecraft/ModList.cpp index b9c7d9ba..d1ad75ab 100644 --- a/api/logic/minecraft/ModList.cpp +++ b/api/logic/minecraft/ModList.cpp @@ -175,6 +175,21 @@ bool ModList::installMod(const QString &filename) return false; } +bool ModList::enableMods(const QModelIndexList& indexes, bool enable) +{ + if(indexes.isEmpty()) + return true; + + for (auto i: indexes) + { + Mod &m = mods[i.row()]; + m.enable(enable); + emit dataChanged(i, i); + } + emit changed(); + return true; +} + bool ModList::deleteMods(const QModelIndexList& indexes) { if(indexes.isEmpty()) |