From 9a03783f491505940a20d006055a5427bf364807 Mon Sep 17 00:00:00 2001 From: Tannin Date: Fri, 18 Oct 2013 23:35:38 +0200 Subject: - 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 --- src/modlist.cpp | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) (limited to 'src/modlist.cpp') 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; } -- cgit v1.3.1