Skip to content
Permalink
Browse files
Disable add attribute and delete attribute buttons in attribute table…
… until start editing is pressed and the data provider supports these operation

git-svn-id: http://svn.osgeo.org/qgis/trunk@6825 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Mar 21, 2007
1 parent 4faae3d commit d83cef4b177dd3296602ad560587f4dc456c8774
Showing with 4 additions and 0 deletions.
  1. +4 −0 src/app/qgsattributetabledisplay.cpp
@@ -58,6 +58,10 @@ QgsAttributeTableDisplay::QgsAttributeTableDisplay(QgsVectorLayer* layer, QgisAp
connect(btnAdvancedSearch, SIGNAL(clicked()), this, SLOT(advancedSearch()));
connect(btnClose, SIGNAL(clicked()), this, SLOT(close()));

//disable those buttons until start editing has been pressed and provider supports it
mAddAttributeButton->setEnabled(false);
mDeleteAttributeButton->setEnabled(false);

btnStopEditing->setEnabled(false);
int cap=layer->getDataProvider()->capabilities();
if((cap&QgsVectorDataProvider::ChangeAttributeValues)

0 comments on commit d83cef4

Please sign in to comment.