Skip to content

Commit 1a1c3ae

Browse files
author
brushtyler
committedNov 14, 2010
disable the attribute table's "toggle editing" button when the layer is read-only
git-svn-id: http://svn.osgeo.org/qgis/trunk@14661 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 77ce11f commit 1a1c3ae

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎src/app/attributetable/qgsattributetabledialog.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ QgsAttributeTableDialog::QgsAttributeTableDialog( QgsVectorLayer *theLayer, QWid
101101
bool canDeleteAttributes = mLayer->dataProvider()->capabilities() & QgsVectorDataProvider::DeleteAttributes;
102102
mToggleEditingButton->setCheckable( true );
103103
mToggleEditingButton->setChecked( mLayer->isEditable() );
104-
mToggleEditingButton->setEnabled( canChangeAttributes );
104+
mToggleEditingButton->setEnabled( canChangeAttributes && !mLayer->isReadOnly() );
105105
mOpenFieldCalculator->setEnabled( canChangeAttributes && mLayer->isEditable() );
106106
mDeleteSelectedButton->setEnabled( canDeleteFeatures && mLayer->isEditable() );
107107
mAddAttribute->setEnabled( canAddAttributes && mLayer->isEditable() );

0 commit comments

Comments
 (0)