From 917c08cd5f87bd06e872b6fb99e00cb5ef5d0066 Mon Sep 17 00:00:00 2001 From: Al Date: Tue, 22 Jan 2019 13:26:52 +0100 Subject: Fixed a crash with "Disable Selected" while in "checked" filter and similar cases --- src/modlist.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/modlist.cpp') 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); } } + + } } -- cgit v1.3.1