summaryrefslogtreecommitdiff
path: root/src/modlist.cpp
diff options
context:
space:
mode:
authorTannin <devnull@localhost>2013-06-05 10:05:29 +0200
committerTannin <devnull@localhost>2013-06-05 10:05:29 +0200
commit97111de1409a59eea9e7ab5050ab70f4d01ddb8e (patch)
tree6d3ed6dd899573d23bef15adb2519173cd844b76 /src/modlist.cpp
parent280691ebc36d34c803a5bd8e01616680b0d2fafb (diff)
parent1606c1366f5d0ba304334b0e57680fb99feb88b9 (diff)
Merge
Diffstat (limited to 'src/modlist.cpp')
-rw-r--r--src/modlist.cpp14
1 files changed, 10 insertions, 4 deletions
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));
}
}