Skip to content
Permalink
Browse files

Update the title by calling filterChanged on signals of the QgsAttrib…

…uteTableFilterModel like visibleReloaded or featureFiltered. This has to be done on the one hand, because the final filtering on QgsAttributeTableFilterModel has been done on QgsAttributeTableModel::finished what is sometimes done after the filterChanged on QgsDualView is emmited, and on the other hand in case the filtering on QgsAttributeTableFilterModel has been done from otherwhere. Possibly it's called more than one time on a filtering, but since it's only sets the title in the end this is not bad.
  • Loading branch information
signedav committed May 6, 2020
1 parent c820d0f commit 99bbf4a5e3735bf7870f1ec0940dee22dfc683bc
Showing with 4 additions and 0 deletions.
  1. +4 −0 src/gui/attributetable/qgsdualview.cpp
@@ -248,11 +248,13 @@ void QgsDualView::setFilterMode( QgsAttributeTableFilterModel::FilterMode filter
{
case QgsAttributeTableFilterModel::ShowVisible:
disconnect( mFilterModel->mapCanvas(), &QgsMapCanvas::extentsChanged, this, &QgsDualView::extentChanged );
disconnect( mFilterModel, &QgsAttributeTableFilterModel::visibleReloaded, this, &QgsDualView::filterChanged );
break;

case QgsAttributeTableFilterModel::ShowAll:
case QgsAttributeTableFilterModel::ShowEdited:
case QgsAttributeTableFilterModel::ShowFilteredList:
disconnect( mFilterModel, &QgsAttributeTableFilterModel::featuresFiltered, this, &QgsDualView::filterChanged );
break;

case QgsAttributeTableFilterModel::ShowSelected:
@@ -285,11 +287,13 @@ void QgsDualView::setFilterMode( QgsAttributeTableFilterModel::FilterMode filter
QgsRectangle rect = mFilterModel->mapCanvas()->mapSettings().mapToLayerCoordinates( mLayer, mFilterModel->mapCanvas()->extent() );
r.setFilterRect( rect );
}
connect( mFilterModel, &QgsAttributeTableFilterModel::visibleReloaded, this, &QgsDualView::filterChanged );
break;

case QgsAttributeTableFilterModel::ShowAll:
case QgsAttributeTableFilterModel::ShowEdited:
case QgsAttributeTableFilterModel::ShowFilteredList:
disconnect( mFilterModel, &QgsAttributeTableFilterModel::featuresFiltered, this, &QgsDualView::filterChanged );
break;

case QgsAttributeTableFilterModel::ShowSelected:

0 comments on commit 99bbf4a

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