diff options
| author | Mikaël Capelle <capelle.mikael@gmail.com> | 2020-10-25 17:16:17 +0100 |
|---|---|---|
| committer | Mikaël Capelle <capelle.mikael@gmail.com> | 2020-10-25 17:16:17 +0100 |
| commit | a216177b879bea6db659c65b0c37bbfe70ce08fd (patch) | |
| tree | 788f856e9d47b1b1bef349ac1827b8ca37dbd13a /src/modlist.cpp | |
| parent | 4b8c2b4a3b3f262564775a24a3296d740b97d146 (diff) | |
Move IOrganizer::removeMod() to IModList::removeMod().
Diffstat (limited to 'src/modlist.cpp')
| -rw-r--r-- | src/modlist.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/modlist.cpp b/src/modlist.cpp index 94c8883d..40a9af5e 100644 --- a/src/modlist.cpp +++ b/src/modlist.cpp @@ -939,6 +939,18 @@ QStringList ModList::allModsByProfilePriority(MOBase::IProfile* profile) const return m_Organizer->modsSortedByProfilePriority(mo2Profile); } +bool ModList::removeMod(MOBase::IModInterface* mod) +{ + unsigned int index = ModInfo::getIndex(mod->name()); + if (index == UINT_MAX) { + return mod->remove(); + } + else { + return ModInfo::removeMod(index); + } + notifyModRemoved(mod->name()); +} + IModList::ModStates ModList::state(const QString &name) const { unsigned int modIndex = ModInfo::getIndex(name); |
