Skip to content
Permalink
Browse files

followup to r8211 - missed a file

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@8212 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef
jef committed Mar 12, 2008
1 parent 863d256 commit 3737aefc95562a342aaff0d2acda011caaa130e8
Showing with 18 additions and 1 deletion.
  1. +18 −1 src/app/qgsattributetabledisplay.cpp
@@ -60,7 +60,8 @@ QgsAttributeTableDisplay::QgsAttributeTableDisplay(QgsVectorLayer* layer, QgisAp
connect(mSearchShowResults, SIGNAL(activated(int)), this, SLOT(searchShowResultsChanged(int)));
connect(btnAdvancedSearch, SIGNAL(clicked()), this, SLOT(advancedSearch()));
connect(btnClose, SIGNAL(clicked()), this, SLOT(close()));

connect(tblAttributes, SIGNAL(featureAttributeChanged(int,int)), this, SLOT(changeFeatureAttribute(int,int)));

//disable those buttons until start editing has been pressed and provider supports it
mAddAttributeButton->setEnabled(false);
mDeleteAttributeButton->setEnabled(false);
@@ -407,3 +408,19 @@ void QgsAttributeTableDisplay::showHelp()
{
QgsContextHelp::run(context_id);
}

void QgsAttributeTableDisplay::changeFeatureAttribute(int row, int column)
{
QgsFeatureList &flist = mLayer->addedFeatures();

int id = table()->text(row,0).toInt();

int i;
for(i=0; i<flist.size() && flist[i].featureId()!=id; i++)
;

if(i==flist.size())
return;

flist[i].changeAttribute(column-1, table()->text(row,column));
}

0 comments on commit 3737aef

Please sign in to comment.
You can’t perform that action at this time.