Skip to content

Commit ba495f3

Browse files
committed
Correctly synchronize layer editable state with UI in relation editor
Fix #11524 Thank you very much Benjamin Trigona-Harany
1 parent b7dcd67 commit ba495f3

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/gui/qgsrelationeditorwidget.cpp

+9-1
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,15 @@ void QgsRelationEditorWidget::setRelationFeature( const QgsRelation& relation, c
143143
QgsVectorLayer* lyr = relation.referencingLayer();
144144

145145
bool canChangeAttributes = lyr->dataProvider()->capabilities() & QgsVectorDataProvider::ChangeAttributeValues;
146-
mToggleEditingButton->setEnabled( canChangeAttributes && !lyr->isReadOnly() );
146+
if ( canChangeAttributes && !lyr->isReadOnly() )
147+
{
148+
mToggleEditingButton->setEnabled( true );
149+
referencingLayerEditingToggled();
150+
}
151+
else
152+
{
153+
mToggleEditingButton->setEnabled( false );
154+
}
147155

148156
// If not yet initialized, it is not (yet) visible, so we don't load it to be faster (lazy loading)
149157
// If it is already initialized, it has been set visible before and the currently shown feature is changing

0 commit comments

Comments
 (0)