diff options
| author | Tannin <devnull@localhost> | 2013-10-18 23:35:38 +0200 |
|---|---|---|
| committer | Tannin <devnull@localhost> | 2013-10-18 23:35:38 +0200 |
| commit | 9a03783f491505940a20d006055a5427bf364807 (patch) | |
| tree | 7569f788f2d2e2b0033f274466d38c1ae7098183 /src/modlist.cpp | |
| parent | d73b1e38c8c4dd817fc833fee44216244c87da43 (diff) | |
- tooltip on download list now contains the file name
- bugfix: when refreshing the directory tree conflict information wasn't immediately refreshed (including on start)
- bugfix: dataChanged events wasn't emitted when user changed the modlist
- bugfix: file patterns in checkfnis plugin weren't completely correct
Diffstat (limited to 'src/modlist.cpp')
| -rw-r--r-- | src/modlist.cpp | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/src/modlist.cpp b/src/modlist.cpp index 786f6f17..18bbfd5a 100644 --- a/src/modlist.cpp +++ b/src/modlist.cpp @@ -373,9 +373,10 @@ bool ModList::setData(const QModelIndex &index, const QVariant &value, int role) } return true; } else if (role == Qt::EditRole) { + bool res = false; switch (index.column()) { case COL_NAME: { - return renameMod(modID, value.toString()); + res = renameMod(modID, value.toString()); } break; case COL_PRIORITY: { bool ok = false; @@ -384,9 +385,9 @@ bool ModList::setData(const QModelIndex &index, const QVariant &value, int role) m_Profile->setModPriority(modID, newPriority); emit modlist_changed(index, role); - return true; + res = true; } else { - return false; + res = false; } } break; case COL_MODID: { @@ -396,9 +397,9 @@ bool ModList::setData(const QModelIndex &index, const QVariant &value, int role) if (ok) { info->setNexusID(newID); emit modlist_changed(index, role); - return true; + res = true; } else { - return false; + res = false; } } break; case COL_VERSION: { @@ -407,17 +408,21 @@ bool ModList::setData(const QModelIndex &index, const QVariant &value, int role) VersionInfo version(value.toString(), scheme); if (version.isValid()) { info->setVersion(version); - return true; + res = true; } else { - return false; + res = false; } } break; default: { qWarning("edit on column \"%s\" not supported", getColumnName(index.column()).toUtf8().constData()); - return false; + res = false; } break; } + if (res) { + emit dataChanged(index, index); + } + return res; } else { return false; } |
