Skip to content

Commit

Permalink
use the spatial state ofthe child instead of checking the geometry on…
Browse files Browse the repository at this point in the history
… every buttonUpdate
  • Loading branch information
signedav committed Sep 10, 2020
1 parent 3a27bf3 commit 8c8e4ee
Showing 1 changed file with 2 additions and 13 deletions.
15 changes: 2 additions & 13 deletions src/gui/qgsrelationeditorwidget.cpp
Expand Up @@ -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 );
Expand Down

0 comments on commit 8c8e4ee

Please sign in to comment.