diff options
| author | Al <gabriel.cortesi@outlook.com> | 2018-03-08 22:27:20 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-03-08 22:27:20 +0100 |
| commit | 5b565b56340adbadbab2ad3d3c3d7112c6b2b34c (patch) | |
| tree | ddd75f9a058e91bf0a0abff7cb34f5dae6be6c40 /src/modlist.cpp | |
| parent | a540a542a47fe75d0d0e4594158422aef4340b3a (diff) | |
| parent | 673a5034f0eb9fb12befdbb52ea8dd5d72ac302e (diff) | |
Merge pull request #259 from Al12rs/Dev
Added check for mod rename and a number of small ui changes.
Diffstat (limited to 'src/modlist.cpp')
| -rw-r--r-- | src/modlist.cpp | 5 |
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) {
|
