Skip to content
Permalink
Browse files

set mSaveEditButtons according to the visibility of mToggleEditingBut…

…ton depending on the transactionGroups AND the buttons visibility setting
  • Loading branch information
signedav committed Sep 10, 2020
1 parent dd54a61 commit 374f18bb501ba971edc95a7db6fe3f88ea169aab
Showing with 1 addition and 3 deletions.
  1. +1 −3 src/gui/qgsrelationeditorwidget.cpp
@@ -322,7 +322,6 @@ void QgsRelationEditorWidget::setRelations( const QgsRelation &relation, const Q
if ( it.value()->layers().contains( mRelation.referencingLayer() ) )
{
mToggleEditingButton->setVisible( false );
mSaveEditsButton->setVisible( false );
}
}

@@ -343,7 +342,6 @@ void QgsRelationEditorWidget::setRelations( const QgsRelation &relation, const Q
if ( canChangeAttributes && !lyr->readOnly() )
{
mToggleEditingButton->setEnabled( true );
updateButtons();
}
else
{
@@ -429,7 +427,7 @@ void QgsRelationEditorWidget::updateButtons()
mLinkFeatureButton->setVisible( mButtons.testFlag( QgsAttributeEditorRelation::Button::Link ) );
mUnlinkFeatureButton->setVisible( mButtons.testFlag( QgsAttributeEditorRelation::Button::Unlink ) );
mSaveEditsButton->setVisible( mButtons.testFlag( QgsAttributeEditorRelation::Button::SaveChildEdits ) );
mAddFeatureButton->setVisible( mButtons.testFlag( QgsAttributeEditorRelation::Button::AddChildFeature ) );
mAddFeatureButton->setVisible( mButtons.testFlag( QgsAttributeEditorRelation::Button::AddChildFeature ) && mToggleEditingButton->isVisible() );
mAddFeatureGeometryButton->setVisible( mButtons.testFlag( QgsAttributeEditorRelation::Button::AddChildFeature ) && mEditorContext.mapCanvas() && mEditorContext.cadDockWidget() && spatial );
mDuplicateFeatureButton->setVisible( mButtons.testFlag( QgsAttributeEditorRelation::Button::DuplicateChildFeature ) );
mDeleteFeatureButton->setVisible( mButtons.testFlag( QgsAttributeEditorRelation::Button::DeleteChildFeature ) );

0 comments on commit 374f18b

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