[QGIS Commit] r8212 - trunk/qgis/src/app
svn_qgis at osgeo.org
svn_qgis at osgeo.org
Wed Mar 12 16:44:31 EDT 2008
Author: jef
Date: 2008-03-12 16:44:31 -0400 (Wed, 12 Mar 2008)
New Revision: 8212
Modified:
trunk/qgis/src/app/qgsattributetabledisplay.cpp
Log:
followup to r8211 - missed a file
Modified: trunk/qgis/src/app/qgsattributetabledisplay.cpp
===================================================================
--- trunk/qgis/src/app/qgsattributetabledisplay.cpp 2008-03-12 20:43:20 UTC (rev 8211)
+++ trunk/qgis/src/app/qgsattributetabledisplay.cpp 2008-03-12 20:44:31 UTC (rev 8212)
@@ -60,7 +60,8 @@
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 @@
{
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));
+}
More information about the QGIS-commit
mailing list