mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
Fixed another incorrect QgsMessageViewer usage.
(QGIS was crashing on second WMS identify request) git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@6922 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
parent
9c49b9ecc1
commit
a317d5489d
@ -40,7 +40,6 @@
|
||||
QgsMapToolIdentify::QgsMapToolIdentify(QgsMapCanvas* canvas)
|
||||
: QgsMapTool(canvas),
|
||||
mResults(0),
|
||||
mViewer(0),
|
||||
mRubberBand(0)
|
||||
{
|
||||
// set cursor
|
||||
@ -55,11 +54,6 @@ QgsMapToolIdentify::~QgsMapToolIdentify()
|
||||
mResults->done(0);
|
||||
}
|
||||
|
||||
if (mViewer)
|
||||
{
|
||||
delete mViewer;
|
||||
}
|
||||
|
||||
delete mRubberBand;
|
||||
}
|
||||
|
||||
@ -179,16 +173,11 @@ void QgsMapToolIdentify::identifyRasterWmsLayer(QgsRasterLayer* layer, const Qgs
|
||||
return;
|
||||
}
|
||||
|
||||
if (!mViewer)
|
||||
{
|
||||
mViewer = new QgsMessageViewer();
|
||||
}
|
||||
QgsMessageViewer* viewer = new QgsMessageViewer();
|
||||
viewer->setCaption( layer->name() );
|
||||
viewer->setMessageAsPlainText( text );
|
||||
|
||||
mViewer->setCaption( layer->name() );
|
||||
mViewer->setMessageAsPlainText( text );
|
||||
|
||||
// mViewer->exec();
|
||||
mViewer->show();
|
||||
viewer->showMessage(); // deletes itself on close
|
||||
}
|
||||
|
||||
void QgsMapToolIdentify::identifyVectorLayer(QgsVectorLayer* layer, const QgsPoint& point)
|
||||
|
@ -23,7 +23,6 @@
|
||||
#include <QObject>
|
||||
|
||||
class QgsIdentifyResults;
|
||||
class QgsMessageViewer;
|
||||
class QgsMapLayer;
|
||||
class QgsRasterLayer;
|
||||
class QgsRubberBand;
|
||||
@ -95,9 +94,6 @@ class QgsMapToolIdentify : public QgsMapTool
|
||||
//! Pointer to the identify results dialog for name/value pairs
|
||||
QgsIdentifyResults *mResults;
|
||||
|
||||
//! Pointer to the identify results dialog for WMS XML files
|
||||
QgsMessageViewer * mViewer;
|
||||
|
||||
//! Rubber band for highlighting identified feature
|
||||
QgsRubberBand* mRubberBand;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user