[QGIS Commit] r11927 - trunk/qgis/src/app
svn_qgis at osgeo.org
svn_qgis at osgeo.org
Fri Nov 6 05:42:14 EST 2009
Author: timlinux
Date: 2009-11-06 05:42:11 -0500 (Fri, 06 Nov 2009)
New Revision: 11927
Modified:
trunk/qgis/src/app/qgsmaptoolidentify.cpp
trunk/qgis/src/app/qgsmaptoolidentify.h
Log:
Greetings from Anita and Tim at the QGIS Hackfest in Vienna (Nov 2009). We have just fixed bug #2011 (Crash using Identify Feature)...Wheeeeee
Modified: trunk/qgis/src/app/qgsmaptoolidentify.cpp
===================================================================
--- trunk/qgis/src/app/qgsmaptoolidentify.cpp 2009-11-06 08:55:35 UTC (rev 11926)
+++ trunk/qgis/src/app/qgsmaptoolidentify.cpp 2009-11-06 10:42:11 UTC (rev 11927)
@@ -72,6 +72,10 @@
return;
}
+ if ( !mResults )
+ {
+ mResults = new QgsIdentifyResults( mCanvas, mCanvas->window() );
+ }
mResults->clear();
QSettings settings;
@@ -147,6 +151,10 @@
void QgsMapToolIdentify::activate()
{
+ if ( !mResults )
+ {
+ mResults = new QgsIdentifyResults( mCanvas, mCanvas->window() );
+ }
mResults->activate();
QgsMapTool::activate();
}
Modified: trunk/qgis/src/app/qgsmaptoolidentify.h
===================================================================
--- trunk/qgis/src/app/qgsmaptoolidentify.h 2009-11-06 08:55:35 UTC (rev 11926)
+++ trunk/qgis/src/app/qgsmaptoolidentify.h 2009-11-06 10:42:11 UTC (rev 11927)
@@ -24,6 +24,7 @@
#include "qgsdistancearea.h"
#include <QObject>
+#include <QPointer>
class QgsIdentifyResults;
class QgsMapLayer;
@@ -71,7 +72,7 @@
bool identifyVectorLayer( QgsVectorLayer *layer, int x, int y );
//! Pointer to the identify results dialog for name/value pairs
- QgsIdentifyResults *mResults;
+ QPointer<QgsIdentifyResults> mResults;
//! Private helper
void convertMeasurement( QgsDistanceArea &calc, double &measure, QGis::UnitType &u, bool isArea );
More information about the QGIS-commit
mailing list