From 398131d5becb5d317f164688563a904040c45b8d Mon Sep 17 00:00:00 2001 From: Denis Rouzaud Date: Thu, 1 Oct 2020 10:58:23 +0200 Subject: [PATCH] remove warning when trying to pan to non spatial layer features (#39110) --- src/gui/attributetable/qgsdualview.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/gui/attributetable/qgsdualview.cpp b/src/gui/attributetable/qgsdualview.cpp index 9372f41f96e..c6be26dee5d 100644 --- a/src/gui/attributetable/qgsdualview.cpp +++ b/src/gui/attributetable/qgsdualview.cpp @@ -583,7 +583,7 @@ void QgsDualView::panZoomGroupButtonToggled( QAbstractButton *button, bool check QgsSettings().setEnumValue( QStringLiteral( "/qgis/attributeTable/featureListBrowsingAction" ), NoAction ); } - if ( checked ) + if ( checked && mLayer->isSpatial() ) panOrZoomToFeature( mFeatureListView->currentEditSelection() ); } @@ -618,7 +618,8 @@ void QgsDualView::featureListCurrentEditSelectionChanged( const QgsFeature &feat featureset << feat.id(); setCurrentEditSelection( featureset ); - panOrZoomToFeature( featureset ); + if ( mLayer->isSpatial() ) + panOrZoomToFeature( featureset ); } else