Skip to content
Permalink
Browse files

Set FilterMode of FilterModel before reloading the data, because othe…

…rwise the old connections are still active.
  • Loading branch information
signedav committed May 1, 2020
1 parent 759db0a commit ef379f3dc785acc6c387efd64972a71f184a72fc
Showing with 8 additions and 8 deletions.
  1. +8 −8 src/gui/attributetable/qgsdualview.cpp
@@ -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 )
{
@@ -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();
}

0 comments on commit ef379f3

Please sign in to comment.
You can’t perform that action at this time.