Skip to content
Snippets Groups Projects
Commit efcf9c43 authored by Stepan Salenikovich's avatar Stepan Salenikovich
Browse files

re-filter PeopleProxy on selected account change

Since the filterAcceptsRow filtering depends on the account
selection we should automatically re-filter when it changes; the
clients shouldn't be responsible for this.

Change-Id: I94dce4eaa5fe77aec1cfa4efa5a6fbc75dce7584
parent 2c79ed4f
No related branches found
No related tags found
No related merge requests found
...@@ -1140,6 +1140,11 @@ RecentModel::peopleProxy() const ...@@ -1140,6 +1140,11 @@ RecentModel::peopleProxy() const
PeopleProxy::PeopleProxy(RecentModel* sourceModel) PeopleProxy::PeopleProxy(RecentModel* sourceModel)
{ {
setSourceModel(sourceModel); setSourceModel(sourceModel);
/* since the filterAcceptsRow depends on the selected account, we need to re-run the filtering
* when the selected account changes automatically */
connect( AvailableAccountModel::instance().selectionModel(),
&QItemSelectionModel::currentChanged, [this]() {this->invalidateFilter();});
} }
bool bool
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment