Skip to content

Commit

Permalink
Disable add attribute and delete attribute buttons in attribute table…
Browse files Browse the repository at this point in the history
… 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 d83cef4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/app/qgsattributetabledisplay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit d83cef4

Please sign in to comment.