From 18574c2ba89737b2140236bde479e87616470270 Mon Sep 17 00:00:00 2001 From: Tannin Date: Sat, 31 May 2014 13:44:26 +0200 Subject: - removed needless modlist-rewrite --- src/modlist.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/modlist.cpp') 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); -- cgit v1.3.1