Skip to content
Permalink
Browse files

Fix scale-dependent, data defined fields test against renderer's scal…

…e for accuracy
  • Loading branch information
dakcarto committed Aug 16, 2012
1 parent 7079f20 commit b2f32144b976d82835c55fffc13dc3043dba03da
Showing with 4 additions and 6 deletions.
  1. +4 −6 src/core/qgspallabeling.cpp
@@ -522,9 +522,8 @@ void QgsPalLayerSettings::registerFeature( QgsVectorLayer* layer, QgsFeature& f
if ( minScaleValue.isValid() )
{
bool conversionOk;
int minScale = minScaleValue.toInt( &conversionOk );
// TODO: occasional floating point issues?
if ( conversionOk && ( int )( context.rendererScale() ) < minScale )
double minScale = minScaleValue.toDouble( &conversionOk );
if ( conversionOk && context.rendererScale() < minScale )
{
return;
}
@@ -539,9 +538,8 @@ void QgsPalLayerSettings::registerFeature( QgsVectorLayer* layer, QgsFeature& f
if ( maxScaleValue.isValid() )
{
bool conversionOk;
int maxScale = maxScaleValue.toInt( &conversionOk );
// TODO: occasional floating point issues?
if ( conversionOk && ( int )( context.rendererScale() ) > maxScale )
double maxScale = maxScaleValue.toDouble( &conversionOk );
if ( conversionOk && context.rendererScale() > maxScale )
{
return;
}

0 comments on commit b2f3214

Please sign in to comment.
You can’t perform that action at this time.