mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
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:
parent
b397e17758
commit
ea9c9ff70a
@ -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();
|
||||
}
|
||||
|
@ -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 );
|
||||
|
Loading…
x
Reference in New Issue
Block a user