Skip to content
Permalink
Browse files

use the spatial state ofthe child instead of checking the geometry on…

… every buttonUpdate
  • Loading branch information
signedav committed Sep 10, 2020
1 parent 3a27bf3 commit 8c8e4ee12d57217a135f17acb9dae21301896cd2
Showing with 2 additions and 13 deletions.
  1. +2 −13 src/gui/qgsrelationeditorwidget.cpp
@@ -432,19 +432,8 @@ void QgsRelationEditorWidget::updateButtons()

mZoomToFeatureButton->setVisible(
mButtons.testFlag( QgsAttributeEditorRelation::Button::ZoomToChildFeature ) &&
mEditorContext.mapCanvas() && (
(
mNmRelation.isValid() &&
mNmRelation.referencedLayer()->geometryType() != QgsWkbTypes::NullGeometry &&
mNmRelation.referencedLayer()->geometryType() != QgsWkbTypes::UnknownGeometry
)
||
(
mRelation.isValid() &&
mRelation.referencingLayer()->geometryType() != QgsWkbTypes::NullGeometry &&
mRelation.referencingLayer()->geometryType() != QgsWkbTypes::UnknownGeometry
)
)
mEditorContext.mapCanvas() &&
mChildIsSpatial
);

mZoomToFeatureButton->setEnabled( selectionNotEmpty );

0 comments on commit 8c8e4ee

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