Skip to content
Permalink
Browse files

Use QgsHighlight instead of QgsRubberBand (inner rings of polygons ar…

…e shown)
  • Loading branch information
mhugent committed May 21, 2013
1 parent 29871ee commit 1bc397d3ac0af387098b8bd06a42418770c5e851
Showing with 8 additions and 9 deletions.
  1. +6 −7 src/app/qgsmaptoolidentifyaction.cpp
  2. +2 −2 src/app/qgsmaptoolidentifyaction.h
@@ -19,6 +19,7 @@
#include "qgsfeature.h"
#include "qgsfield.h"
#include "qgsgeometry.h"
#include "qgshighlight.h"
#include "qgslogger.h"
#include "qgsidentifyresultsdialog.h"
#include "qgsmapcanvas.h"
@@ -33,7 +34,6 @@
#include "qgsmaplayerregistry.h"
#include "qgisapp.h"
#include "qgsrendererv2.h"
#include "qgsrubberband.h"

#include <QSettings>
#include <QMessageBox>
@@ -204,11 +204,10 @@ void QgsMapToolIdentifyAction::handleMenuHover()
QList<IdentifyResult>::const_iterator idListIt = idList.constBegin();
for ( ; idListIt != idList.constEnd(); ++idListIt )
{
QgsRubberBand* rb = new QgsRubberBand( mCanvas );
rb->setColor( QColor( 255, 0, 0 ) );
rb->setWidth( 2 );
rb->setToGeometry( idListIt->mFeature.geometry(), vl );
mRubberBands.append( rb );
QgsHighlight* hl = new QgsHighlight( mCanvas, idListIt->mFeature.geometry(), vl );
hl->setColor( QColor( 255, 0, 0 ) );
hl->setWidth( 2 );
mRubberBands.append( hl );
}
}
}
@@ -217,7 +216,7 @@ void QgsMapToolIdentifyAction::handleMenuHover()

void QgsMapToolIdentifyAction::deleteRubberBands()
{
QList<QgsRubberBand*>::const_iterator it = mRubberBands.constBegin();
QList<QgsHighlight*>::const_iterator it = mRubberBands.constBegin();
for ( ; it != mRubberBands.constEnd(); ++it )
{
delete *it;
@@ -27,10 +27,10 @@
#include <QObject>
#include <QPointer>

class QgsHighlight;
class QgsIdentifyResultsDialog;
class QgsMapLayer;
class QgsRasterLayer;
class QgsRubberBand;
class QgsVectorLayer;
class QMenu;

@@ -80,7 +80,7 @@ class QgsMapToolIdentifyAction : public QgsMapToolIdentify
//! layer id map for layer select mode
QMap< QgsMapLayer*, QList<IdentifyResult> > mLayerIdResults;
//! rubber bands for layer select mode
QList<QgsRubberBand*> mRubberBands;
QList<QgsHighlight*> mRubberBands;

QgsIdentifyResultsDialog *resultsDialog();

0 comments on commit 1bc397d

Please sign in to comment.
You can’t perform that action at this time.