From a216177b879bea6db659c65b0c37bbfe70ce08fd Mon Sep 17 00:00:00 2001 From: Mikaƫl Capelle Date: Sun, 25 Oct 2020 17:16:17 +0100 Subject: Move IOrganizer::removeMod() to IModList::removeMod(). --- src/modlist.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/modlist.cpp') 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); -- cgit v1.3.1