remove warning when trying to pan to non spatial layer features (#39110)

This commit is contained in:
Denis Rouzaud 2020-10-01 10:58:23 +02:00 committed by GitHub
parent 55ee2935a2
commit 398131d5be
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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