Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 8bffff28 authored by David Faure's avatar David Faure

StandardActionManager: allow using a proxy on top of FavoriteCollectionsModel

Summary:
Using favoriteSelectionModel->model(), we get the correct model
for the selection.

Test Plan:
Fixes asserts when selecting a favorite, with the upcoming
kmail patch to add a proxy on top of FavoriteCollectionsModel.

Reviewers: dvratil

Reviewed By: dvratil

Subscribers: #kde_pim

Tags: #kde_pim

Differential Revision: https://phabricator.kde.org/D8803
parent edfca539
......@@ -556,11 +556,11 @@ public:
return;
}
InsideSelectionSlotBlocker block(this);
QItemSelection selection = collectionSelectionModel->selection();
selection = mapToEntityTreeModel(collectionSelectionModel->model(), selection);
selection = mapFromEntityTreeModel(favoritesModel, selection);
if (favoriteSelectionModel) {
QItemSelection selection = collectionSelectionModel->selection();
selection = mapToEntityTreeModel(collectionSelectionModel->model(), selection);
selection = mapFromEntityTreeModel(favoriteSelectionModel->model(), selection);
favoriteSelectionModel->select(selection, QItemSelectionModel::ClearAndSelect);
}
......@@ -577,7 +577,7 @@ public:
return;
}
selection = mapToEntityTreeModel(favoritesModel, selection);
selection = mapToEntityTreeModel(favoriteSelectionModel->model(), selection);
selection = mapFromEntityTreeModel(collectionSelectionModel->model(), selection);
InsideSelectionSlotBlocker block(this);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment