mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-27 00:33:48 -05:00
Fix scale-dependent, data defined fields test against renderer's scale for accuracy
This commit is contained in:
parent
7079f20ebf
commit
b2f32144b9
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user