1919#include " qgsfeature.h"
2020#include " qgsfield.h"
2121#include " qgsgeometry.h"
22+ #include " qgshighlight.h"
2223#include " qgslogger.h"
2324#include " qgsidentifyresultsdialog.h"
2425#include " qgsmapcanvas.h"
3334#include " qgsmaplayerregistry.h"
3435#include " qgisapp.h"
3536#include " qgsrendererv2.h"
36- #include " qgsrubberband.h"
3737
3838#include < QSettings>
3939#include < QMessageBox>
@@ -204,11 +204,10 @@ void QgsMapToolIdentifyAction::handleMenuHover()
204204 QList<IdentifyResult>::const_iterator idListIt = idList.constBegin ();
205205 for ( ; idListIt != idList.constEnd (); ++idListIt )
206206 {
207- QgsRubberBand* rb = new QgsRubberBand ( mCanvas );
208- rb->setColor ( QColor ( 255 , 0 , 0 ) );
209- rb->setWidth ( 2 );
210- rb->setToGeometry ( idListIt->mFeature .geometry (), vl );
211- mRubberBands .append ( rb );
207+ QgsHighlight* hl = new QgsHighlight ( mCanvas , idListIt->mFeature .geometry (), vl );
208+ hl->setColor ( QColor ( 255 , 0 , 0 ) );
209+ hl->setWidth ( 2 );
210+ mRubberBands .append ( hl );
212211 }
213212 }
214213 }
@@ -217,7 +216,7 @@ void QgsMapToolIdentifyAction::handleMenuHover()
217216
218217void QgsMapToolIdentifyAction::deleteRubberBands ()
219218{
220- QList<QgsRubberBand *>::const_iterator it = mRubberBands .constBegin ();
219+ QList<QgsHighlight *>::const_iterator it = mRubberBands .constBegin ();
221220 for ( ; it != mRubberBands .constEnd (); ++it )
222221 {
223222 delete *it;
0 commit comments