Skip to content

Commit

Permalink
Greetings from Anita and Tim at the QGIS Hackfest in Vienna (Nov 2009…
Browse files Browse the repository at this point in the history
…). 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
  • Loading branch information
timlinux committed Nov 6, 2009
1 parent b397e17 commit ea9c9ff
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
8 changes: 8 additions & 0 deletions src/app/qgsmaptoolidentify.cpp
Expand Up @@ -72,6 +72,10 @@ void QgsMapToolIdentify::canvasReleaseEvent( QMouseEvent * e )
return;
}

if ( !mResults )
{
mResults = new QgsIdentifyResults( mCanvas, mCanvas->window() );
}
mResults->clear();

QSettings settings;
Expand Down Expand Up @@ -147,6 +151,10 @@ void QgsMapToolIdentify::canvasReleaseEvent( QMouseEvent * e )

void QgsMapToolIdentify::activate()
{
if ( !mResults )
{
mResults = new QgsIdentifyResults( mCanvas, mCanvas->window() );
}
mResults->activate();
QgsMapTool::activate();
}
Expand Down
3 changes: 2 additions & 1 deletion src/app/qgsmaptoolidentify.h
Expand Up @@ -24,6 +24,7 @@
#include "qgsdistancearea.h"

#include <QObject>
#include <QPointer>

class QgsIdentifyResults;
class QgsMapLayer;
Expand Down Expand Up @@ -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 );
Expand Down

0 comments on commit ea9c9ff

Please sign in to comment.