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 11, 2012
1 parent 49cdac0 commit 09ce9d4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/app/qgshighlight.cpp
Expand Up @@ -18,6 +18,7 @@
#include "qgsgeometry.h"
#include "qgsmapcanvas.h"
#include "qgsmaprenderer.h"
#include "qgscoordinatetransform.h"
#include "qgsvectorlayer.h"
#include <QPainter>

Expand All @@ -31,6 +32,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 09ce9d4

Please sign in to comment.