Skip to content

Commit

Permalink
Merge pull request #7316 from m-kuhn/hideZoomToFeature
Browse files Browse the repository at this point in the history
Hide zoom to feature button for nonspatial embedded forms
  • Loading branch information
m-kuhn committed Jun 28, 2018
2 parents 4c8b801 + cbb8a2b commit 9643d52
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/gui/qgsrelationeditorwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,11 @@ void QgsRelationEditorWidget::setRelations( const QgsRelation &relation, const Q
mToggleEditingButton->setEnabled( false );
}

if ( mNmRelation.isValid() )
mZoomToFeatureButton->setVisible( mNmRelation.referencedLayer()->isSpatial() );
else
mZoomToFeatureButton->setVisible( mRelation.referencingLayer()->isSpatial() );

setObjectName( QStringLiteral( "referenced/" ) + mRelation.name() );

updateUi();
Expand Down

0 comments on commit 9643d52

Please sign in to comment.