summaryrefslogtreecommitdiff
path: root/src/modlist.cpp
diff options
context:
space:
mode:
authorTannin <devnull@localhost>2014-05-31 13:44:26 +0200
committerTannin <devnull@localhost>2014-05-31 13:44:26 +0200
commit18574c2ba89737b2140236bde479e87616470270 (patch)
tree42782fefd5130bd2fd9f45d87a8bb8d2a2155496 /src/modlist.cpp
parent1eb783aae348f906056cee17cb65dfd507429901 (diff)
- removed needless modlist-rewrite
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);