Skip to content

Commit

Permalink
Set FilterMode of FilterModel before reloading the data, because othe…
Browse files Browse the repository at this point in the history
…rwise the old connections are still active.
  • Loading branch information
signedav committed May 1, 2020
1 parent 759db0a commit ef379f3
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/gui/attributetable/qgsdualview.cpp
Expand Up @@ -298,14 +298,6 @@ void QgsDualView::setFilterMode( QgsAttributeTableFilterModel::FilterMode filter
break;
}

if ( requiresTableReload )
{
mMasterModel->setRequest( r );
whileBlocking( mLayerCache )->setCacheGeometry( needsGeometry );
mMasterModel->loadLayer();
}


// disable the browsing auto pan/scale if the list only shows visible items
switch ( filterMode )
{
Expand All @@ -323,6 +315,14 @@ void QgsDualView::setFilterMode( QgsAttributeTableFilterModel::FilterMode filter

//update filter model
mFilterModel->setFilterMode( filterMode );

if ( requiresTableReload )
{
mMasterModel->setRequest( r );
whileBlocking( mLayerCache )->setCacheGeometry( needsGeometry );
mMasterModel->loadLayer();
}

emit filterChanged();
}

Expand Down

0 comments on commit ef379f3

Please sign in to comment.