diff options
| author | Mikaël Capelle <capelle.mikael@gmail.com> | 2021-01-09 20:21:43 +0100 |
|---|---|---|
| committer | Mikaël Capelle <capelle.mikael@gmail.com> | 2021-01-10 10:27:31 +0100 |
| commit | 342d529dd6ad36ecc3455927dbe5a1d10cbb648b (patch) | |
| tree | d1918c25b397e44ff05855597cce8a9f95f8a963 | |
| parent | 883ca5d376d9cc7de17620d3b0444e201c683da0 (diff) | |
Do not notifyChange if the new name is identical to the old name.
| -rw-r--r-- | src/modlist.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/modlist.cpp b/src/modlist.cpp index 055778f3..f820e4d1 100644 --- a/src/modlist.cpp +++ b/src/modlist.cpp @@ -555,15 +555,16 @@ bool ModList::renameMod(int index, const QString &newName) m_Profile->cancelModlistWrite(); - if (modInfo->setName(nameFixed)) + if (modInfo->setName(nameFixed)) { // Notice there is a good chance that setName() updated the modinfo indexes // the modRenamed() call will refresh the indexes in the current profile // and update the modlists in all profiles emit modRenamed(oldName, nameFixed); - } + } - // invalidate the currently displayed state of this list - notifyChange(-1); + // invalidate the currently displayed state of this list + notifyChange(-1); + } return true; } |
