Greetings from Anita and Tim at the QGIS Hackfest in Vienna (Nov 2009). We have just fixed bug #2011 (Crash using Identify Feature)...Wheeeeee

git-svn-id: http://svn.osgeo.org/qgis/trunk@11927 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
timlinux 2009-11-06 10:42:11 +00:00
parent b397e17758
commit ea9c9ff70a
2 changed files with 10 additions and 1 deletions

View File

@ -72,6 +72,10 @@ void QgsMapToolIdentify::canvasReleaseEvent( QMouseEvent * e )
return;
}
if ( !mResults )
{
mResults = new QgsIdentifyResults( mCanvas, mCanvas->window() );
}
mResults->clear();
QSettings settings;
@ -147,6 +151,10 @@ void QgsMapToolIdentify::canvasReleaseEvent( QMouseEvent * e )
void QgsMapToolIdentify::activate()
{
if ( !mResults )
{
mResults = new QgsIdentifyResults( mCanvas, mCanvas->window() );
}
mResults->activate();
QgsMapTool::activate();
}

View File

@ -24,6 +24,7 @@
#include "qgsdistancearea.h"
#include <QObject>
#include <QPointer>
class QgsIdentifyResults;
class QgsMapLayer;
@ -71,7 +72,7 @@ class QgsMapToolIdentify : public QgsMapTool
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 );