[QGIS Commit] r12987 - trunk/qgis/src/app
svn_qgis at osgeo.org
svn_qgis at osgeo.org
Mon Mar 1 10:53:14 EST 2010
Author: jef
Date: 2010-03-01 10:53:12 -0500 (Mon, 01 Mar 2010)
New Revision: 12987
Modified:
trunk/qgis/src/app/qgsidentifyresults.cpp
trunk/qgis/src/app/qgsidentifyresults.h
Log:
fix crash
Modified: trunk/qgis/src/app/qgsidentifyresults.cpp
===================================================================
--- trunk/qgis/src/app/qgsidentifyresults.cpp 2010-03-01 07:52:20 UTC (rev 12986)
+++ trunk/qgis/src/app/qgsidentifyresults.cpp 2010-03-01 15:53:12 UTC (rev 12987)
@@ -47,14 +47,20 @@
QgisApp::instance()->runPythonString( expr );
}
-void QgsFeatureAction::execute()
+QgsFeatureAction::QgsFeatureAction( const QString &name, QgsIdentifyResults *results, QgsVectorLayer *vl, int action, QTreeWidgetItem *featItem )
+ : QAction( name, results )
+ , mLayer( vl )
+ , mAction( action )
{
- int idx;
QList< QPair<QString, QString> > attributes;
- mResults->retrieveAttributes( mFeatItem, attributes, idx );
- mLayer->actions()->doAction( mAction, attributes, idx, _runPythonString );
+ results->retrieveAttributes( featItem, mAttributes, mIdx );
}
+void QgsFeatureAction::execute()
+{
+ mLayer->actions()->doAction( mAction, mAttributes, mIdx, _runPythonString );
+}
+
class QgsIdentifyResultsDock : public QDockWidget
{
public:
Modified: trunk/qgis/src/app/qgsidentifyresults.h
===================================================================
--- trunk/qgis/src/app/qgsidentifyresults.h 2010-03-01 07:52:20 UTC (rev 12986)
+++ trunk/qgis/src/app/qgsidentifyresults.h 2010-03-01 15:53:12 UTC (rev 12987)
@@ -137,18 +137,16 @@
Q_OBJECT
public:
- QgsFeatureAction( const QString &name, QgsIdentifyResults *results, QgsVectorLayer *vl, int action, QTreeWidgetItem *featItem ) :
- QAction( name, results ), mResults( results ), mLayer( vl ), mAction( action ), mFeatItem( featItem )
- {}
+ QgsFeatureAction( const QString &name, QgsIdentifyResults *results, QgsVectorLayer *vl, int action, QTreeWidgetItem *featItem );
public slots:
void execute();
private:
- QgsIdentifyResults *mResults;
QgsVectorLayer *mLayer;
int mAction;
- QTreeWidgetItem *mFeatItem;
+ int mIdx;
+ QList< QPair<QString, QString> > mAttributes;
};
#endif
More information about the QGIS-commit
mailing list