diff options
| author | Tannin <devnull@localhost> | 2013-10-06 13:34:34 +0200 |
|---|---|---|
| committer | Tannin <devnull@localhost> | 2013-10-06 13:34:34 +0200 |
| commit | 823dfd410b90407cf6a641226bc46291f23d0004 (patch) | |
| tree | 430e9814c213899eaa937b2ca5d522d2874a1fde /src/modlist.cpp | |
| parent | ba09054e6b22a134de03903ad91a206b9bbbb5d4 (diff) | |
- option to ignore/unignore updates is now only shown if there IS an update
- window now shouldn't lose focus on win 8 2 seconds after mod information gets invalidated
- small bugfix related to new version scheme parsing
Diffstat (limited to 'src/modlist.cpp')
| -rw-r--r-- | src/modlist.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/modlist.cpp b/src/modlist.cpp index 7367b2ae..786f6f17 100644 --- a/src/modlist.cpp +++ b/src/modlist.cpp @@ -144,15 +144,13 @@ QVariant ModList::data(const QModelIndex &modelIndex, int role) const return modInfo->name(); } else if (column == COL_VERSION) { VersionInfo verInfo = modInfo->getVersion(); - if (role == Qt::EditRole) { - return verInfo.canonicalString(); - } else { - QString version = verInfo.displayString(); + QString version = verInfo.displayString(); + if (role != Qt::EditRole) { if (version.isEmpty() && modInfo->canBeUpdated()) { version = "?"; } - return version; } + return version; } else if (column == COL_PRIORITY) { int priority = modInfo->getFixedPriority(); if (priority != INT_MIN) { @@ -405,7 +403,8 @@ bool ModList::setData(const QModelIndex &index, const QVariant &value, int role) } break; case COL_VERSION: { ModInfo::Ptr info = ModInfo::getByIndex(modID); - VersionInfo version(value.toString()); + VersionInfo::VersionScheme scheme = info->getVersion().scheme(); + VersionInfo version(value.toString(), scheme); if (version.isValid()) { info->setVersion(version); return true; |
