From 942bd04e5e3053b4ee3d7d94d51ce8cfa34cb9b9 Mon Sep 17 00:00:00 2001 From: Tannin Date: Sun, 12 Apr 2015 15:48:50 +0200 Subject: bugfix: batch-activation/deactivation used non-persistent indices which seems to be a problem nowadays (probably related to Qt5?) --- src/pluginlist.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/pluginlist.cpp') diff --git a/src/pluginlist.cpp b/src/pluginlist.cpp index f1a58cfb..002c7721 100644 --- a/src/pluginlist.cpp +++ b/src/pluginlist.cpp @@ -1159,9 +1159,13 @@ bool PluginList::eventFilter(QObject *obj, QEvent *event) } else if (keyEvent->key() == Qt::Key_Space) { QItemSelectionModel *selectionModel = itemView->selectionModel(); const QSortFilterProxyModel *proxyModel = qobject_cast(selectionModel->model()); + QList indices; + for (QModelIndex idx : selectionModel->selectedRows()) { + indices.append(idx); + } QModelIndex minRow, maxRow; - foreach (QModelIndex idx, selectionModel->selectedRows()) { + for (QModelIndex idx : indices) { if (proxyModel != nullptr) { idx = proxyModel->mapToSource(idx); } -- cgit v1.3.1