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/qgis@6825 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
mhugent 2007-03-21 15:42:03 +00:00
parent a13227ea34
commit b890bc5fa4

View File

@ -58,6 +58,10 @@ QgsAttributeTableDisplay::QgsAttributeTableDisplay(QgsVectorLayer* layer, QgisAp
connect(btnAdvancedSearch, SIGNAL(clicked()), this, SLOT(advancedSearch())); connect(btnAdvancedSearch, SIGNAL(clicked()), this, SLOT(advancedSearch()));
connect(btnClose, SIGNAL(clicked()), this, SLOT(close())); 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); btnStopEditing->setEnabled(false);
int cap=layer->getDataProvider()->capabilities(); int cap=layer->getDataProvider()->capabilities();
if((cap&QgsVectorDataProvider::ChangeAttributeValues) if((cap&QgsVectorDataProvider::ChangeAttributeValues)