summaryrefslogtreecommitdiff
path: root/src/modlist.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modlist.cpp')
-rw-r--r--src/modlist.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/modlist.cpp b/src/modlist.cpp
index 25b0eb52..66bc66b4 100644
--- a/src/modlist.cpp
+++ b/src/modlist.cpp
@@ -354,10 +354,10 @@ bool ModList::renameMod(int index, const QString &newName)
ModInfo::Ptr modInfo = ModInfo::getByIndex(index);
QString oldName = modInfo->name();
- modInfo->setName(nameFixed);
- // this just broke all profiles! The recipient of modRenamed has to do some magic
- // to can't write the currently active profile back
- emit modRenamed(oldName, nameFixed);
+ if (modInfo->setName(nameFixed)) {
+ // this just disabled the mod in all profiles. The recipient of modRenamed must fix that
+ emit modRenamed(oldName, nameFixed);
+ }
// invalidate the currently displayed state of this list
notifyChange(-1);