Skip to content

Commit c9902b7

Browse files
author
jef
committedAug 11, 2010
fix r14018 (reenable pal label reprojection)
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@14068 c8812cc2-4d05-0410-92ff-de0c093fc19c

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed
 

‎src/core/qgspallabeling.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
#include <qgsvectordataprovider.h>
4545
#include <qgsgeometry.h>
4646
#include <qgsmaprenderer.h>
47+
#include "qgslogger.h"
4748

4849

4950
using namespace pal;
@@ -416,13 +417,14 @@ void QgsPalLayerSettings::registerFeature( QgsFeature& f, const QgsRenderContext
416417
}
417418

418419
QgsGeometry* geom = f.geometry();
420+
421+
if ( ct ) // reproject the geometry if necessary
422+
geom->transform( *ct );
423+
419424
GEOSGeometry* geos_geom = geom->asGeos();
420425
if ( geos_geom == NULL )
421426
return; // invalid geometry
422427

423-
if ( ct != NULL ) // reproject the geometry if necessary
424-
geom->transform( *ct );
425-
426428
if ( !checkMinimumSizeMM( context, geom, minFeatureSize ) )
427429
{
428430
return;
@@ -858,9 +860,7 @@ void QgsPalLabeling::drawLabelCandidateRect( pal::LabelPosition* lp, QPainter* p
858860
drawLabelCandidateRect( lp->getNextPart(), painter, xform );
859861
}
860862

861-
#include "qgslogger.h"
862-
863-
void QgsPalLabeling::drawLabel( pal::LabelPosition* label, QPainter* painter, const QFont& f, const QColor& c, const QgsMapToPixel* xform, double bufferSize, \
863+
void QgsPalLabeling::drawLabel( pal::LabelPosition* label, QPainter* painter, const QFont& f, const QColor& c, const QgsMapToPixel* xform, double bufferSize,
864864
const QColor& bufferColor, bool drawBuffer )
865865
{
866866
QgsPoint outPt = xform->transform( label->getX(), label->getY() );

0 commit comments

Comments
 (0)
Please sign in to comment.