summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/modlist.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/modlist.cpp b/src/modlist.cpp
index 4002a424..7b2ad1f9 100644
--- a/src/modlist.cpp
+++ b/src/modlist.cpp
@@ -424,6 +424,11 @@ bool ModList::renameMod(int index, const QString &newName)
return false;
}
+ if (ModList::allMods().contains(newName,Qt::CaseInsensitive)) {
+ MessageDialog::showMessage(tr("Name is already in use by another mod"), nullptr);
+ return false;
+ }
+
ModInfo::Ptr modInfo = ModInfo::getByIndex(index);
QString oldName = modInfo->name();
if (newName != oldName) {