Skip to content

Commit

Permalink
fix highlighting for identify tool when OTF enabled (closes #4843)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbruy committed Feb 2, 2012
1 parent 42617a0 commit 62ba02e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/app/qgshighlight.cpp
Expand Up @@ -17,6 +17,7 @@
#include "qgsgeometry.h"
#include "qgsmapcanvas.h"
#include "qgsmaprenderer.h"
#include "qgscoordinatetransform.h"
#include "qgsvectorlayer.h"
#include <QPainter>

Expand All @@ -30,6 +31,11 @@ QgsHighlight::QgsHighlight( QgsMapCanvas* mapCanvas, QgsGeometry *geom, QgsVecto
, mLayer( layer )
{
mGeometry = geom ? new QgsGeometry( *geom ) : 0;
if ( mapCanvas->mapRenderer()->hasCrsTransformEnabled() )
{
QgsCoordinateTransform transform( mLayer->crs(), mapCanvas->mapRenderer()->destinationCrs() );
mGeometry->transform( transform );
}
updateRect();
update();
setColor( QColor( Qt::lightGray ) );
Expand Down

0 comments on commit 62ba02e

Please sign in to comment.