summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMikaël Capelle <capelle.mikael@gmail.com>2021-01-01 16:35:53 +0100
committerMikaël Capelle <capelle.mikael@gmail.com>2021-01-02 15:38:19 +0100
commit21ab4ad78b2b7007dc06ed432d707fc6edf98d6e (patch)
tree3ae7182bd0615ddb8a8f24c45d458a7b6f154df2 /src
parentd708287c9e73db94a097b8151ba8f2b6c820a84d (diff)
Minor cleaning in ModList.
Diffstat (limited to 'src')
-rw-r--r--src/modlist.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/modlist.cpp b/src/modlist.cpp
index 26581ba5..d4b2cc53 100644
--- a/src/modlist.cpp
+++ b/src/modlist.cpp
@@ -595,16 +595,17 @@ bool ModList::setData(const QModelIndex &index, const QVariant &value, int role)
}
result = true;
emit dataChanged(index, index);
- } else if (role == Qt::EditRole) {
+ }
+ else if (role == Qt::EditRole) {
switch (index.column()) {
case COL_NAME: {
auto flags = info->getFlags();
- if (std::find(flags.begin(), flags.end(), ModInfo::FLAG_SEPARATOR) != flags.end())
- {
+ if (info->isSeparator()) {
result = renameMod(modID, value.toString() + "_separator");
}
- else
+ else {
result = renameMod(modID, value.toString());
+ }
} break;
case COL_PRIORITY: {
bool ok = false;
@@ -625,7 +626,6 @@ bool ModList::setData(const QModelIndex &index, const QVariant &value, int role)
int newID = value.toInt(&ok);
if (ok) {
info->setNexusID(newID);
- emit modlistChanged(index, role);
emit tutorialModlistUpdate();
result = true;
} else {