Skip to content

Commit

Permalink
followup to r8211 - missed a file
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@8212 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Mar 12, 2008
1 parent 863d256 commit 3737aef
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion src/app/qgsattributetabledisplay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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.