From d8cb9a4e3710b1a09ac2795541c6b792a917e3a1 Mon Sep 17 00:00:00 2001 From: Tannin Date: Tue, 28 May 2013 22:43:19 +0200 Subject: - bugfixes in hookdll related to path-rerouting - bugfix: expanding modlist groups after changes to modlist works now - bugfix: sorting grouped modlist was broken --- src/modlist.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'src/modlist.cpp') diff --git a/src/modlist.cpp b/src/modlist.cpp index 3fc8ae23..f87687bb 100644 --- a/src/modlist.cpp +++ b/src/modlist.cpp @@ -203,7 +203,12 @@ QVariant ModList::data(const QModelIndex &modelIndex, int role) const return QVariant(); } } else if (column == COL_PRIORITY) { - return m_Profile->getModPriority(modIndex); + int priority = modInfo->getFixedPriority(); + if (priority != INT_MIN) { + return priority; + } else { + return m_Profile->getModPriority(modIndex); + } } else { return modInfo->getNexusID(); } @@ -648,13 +653,14 @@ void ModList::removeRow(int row, const QModelIndex&) } -void ModList::notifyChange(int row) +void ModList::notifyChange(int rowStart, int rowEnd) { - if (row < 0) { + if (rowStart < 0) { beginResetModel(); endResetModel(); } else { - emit dataChanged(this->index(row, 0), this->index(row, this->columnCount() - 1)); + if (rowEnd == -1) rowEnd = rowStart; + emit dataChanged(this->index(rowStart, 0), this->index(rowEnd, this->columnCount() - 1)); } } -- cgit v1.3.1