[QGIS Commit] r11024 - branches/symbology-ng-branch/src/core/pal

svn_qgis at osgeo.org svn_qgis at osgeo.org
Sat Jul 4 18:49:34 EDT 2009


Author: wonder
Date: 2009-07-04 18:49:32 -0400 (Sat, 04 Jul 2009)
New Revision: 11024

Modified:
   branches/symbology-ng-branch/src/core/pal/pal.cpp
Log:
pal: fixed scale-based labeling. Removed one more conversion of label distance.


Modified: branches/symbology-ng-branch/src/core/pal/pal.cpp
===================================================================
--- branches/symbology-ng-branch/src/core/pal/pal.cpp	2009-07-04 20:53:03 UTC (rev 11023)
+++ branches/symbology-ng-branch/src/core/pal/pal.cpp	2009-07-04 22:49:32 UTC (rev 11024)
@@ -255,7 +255,7 @@
 
 
     // feature has to be labeled ?
-    if ( context->layer->toLabel )
+    if ( context->layer->toLabel && context->layer->isScaleValid( context->scale ) )
     {
       // is the feature well defined ? // TODO Check epsilon
       if ( ft_ptr->label_x > 0.0000001 && ft_ptr->label_y > 0.0000001 )
@@ -479,10 +479,11 @@
 
     double dist;
 
-    double distlabel = unit_convert( double( lp->feature->distlabel ),
+    double distlabel = lp->feature->distlabel;
+    /*unit_convert( double( lp->feature->distlabel ),
                                      pal::PIXEL,
                                      pal->map_unit,
-                                     pal->dpi, scale, 1 );
+                                     pal->dpi, scale, 1 );*/
 
 
 



More information about the QGIS-commit mailing list