[QGIS Commit] r14661 - trunk/qgis/src/app/attributetable

svn_qgis at osgeo.org svn_qgis at osgeo.org
Sun Nov 14 16:44:41 EST 2010


Author: brushtyler
Date: 2010-11-14 13:44:41 -0800 (Sun, 14 Nov 2010)
New Revision: 14661

Modified:
   trunk/qgis/src/app/attributetable/qgsattributetabledialog.cpp
Log:
disable the attribute table's "toggle editing" button when the layer is read-only


Modified: trunk/qgis/src/app/attributetable/qgsattributetabledialog.cpp
===================================================================
--- trunk/qgis/src/app/attributetable/qgsattributetabledialog.cpp	2010-11-14 21:41:55 UTC (rev 14660)
+++ trunk/qgis/src/app/attributetable/qgsattributetabledialog.cpp	2010-11-14 21:44:41 UTC (rev 14661)
@@ -101,7 +101,7 @@
   bool canDeleteAttributes = mLayer->dataProvider()->capabilities() & QgsVectorDataProvider::DeleteAttributes;
   mToggleEditingButton->setCheckable( true );
   mToggleEditingButton->setChecked( mLayer->isEditable() );
-  mToggleEditingButton->setEnabled( canChangeAttributes );
+  mToggleEditingButton->setEnabled( canChangeAttributes && !mLayer->isReadOnly() );
   mOpenFieldCalculator->setEnabled( canChangeAttributes && mLayer->isEditable() );
   mDeleteSelectedButton->setEnabled( canDeleteFeatures && mLayer->isEditable() );
   mAddAttribute->setEnabled( canAddAttributes && mLayer->isEditable() );



More information about the QGIS-commit mailing list