diff options
| author | Al <gabriel.cortesi@outlook.com> | 2019-01-22 13:26:52 +0100 |
|---|---|---|
| committer | Al <gabriel.cortesi@outlook.com> | 2019-01-22 13:26:52 +0100 |
| commit | 917c08cd5f87bd06e872b6fb99e00cb5ef5d0066 (patch) | |
| tree | ba0bb0dee06488087e976a9be14cecc806bedf75 /src/modlist.cpp | |
| parent | 11b2e0fe34e5029ab5ffc00d0cebc59bf286b7a8 (diff) | |
Fixed a crash with "Disable Selected" while in "checked" filter and similar cases
Diffstat (limited to 'src/modlist.cpp')
| -rw-r--r-- | src/modlist.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/modlist.cpp b/src/modlist.cpp index 9835d3b9..58fe95d5 100644 --- a/src/modlist.cpp +++ b/src/modlist.cpp @@ -1327,7 +1327,7 @@ bool ModList::eventFilter(QObject *obj, QEvent *event) return QAbstractItemModel::eventFilter(obj, event);
}
-
+//note: caller needs to make sure sort proxy is updated
void ModList::enableSelected(const QItemSelectionModel *selectionModel)
{
if (selectionModel->hasSelection()) {
@@ -1336,13 +1336,12 @@ void ModList::enableSelected(const QItemSelectionModel *selectionModel) int modID = m_Profile->modIndexByPriority(row.data().toInt());
if (!m_Profile->modEnabled(modID)) {
m_Profile->setModEnabled(modID, true);
- emit modlist_changed(row, 0);
}
}
}
}
-
+//note: caller needs to make sure sort proxy is updated
void ModList::disableSelected(const QItemSelectionModel *selectionModel)
{
if (selectionModel->hasSelection()) {
@@ -1351,8 +1350,9 @@ void ModList::disableSelected(const QItemSelectionModel *selectionModel) int modID = m_Profile->modIndexByPriority(row.data().toInt());
if (m_Profile->modEnabled(modID)) {
m_Profile->setModEnabled(modID, false);
- emit modlist_changed(row, 0);
}
}
+
+
}
}
|
