Fix label priority when using non-pixel sizes

This commit is contained in:
Nyall Dawson 2020-09-07 10:59:11 +10:00
parent 93d25d61e7
commit 1d1e1cc29d

View File

@ -887,7 +887,7 @@ void QgsMapBoxGlStyleConverter::parseSymbolLayer( const QVariantMap &jsonLayer,
if ( textSize >= 0 )
{
// TODO -- this probably needs revisiting -- it was copied from the MapTiler code, but may be wrong...
labelSettings.priority = std::min( textSize / 3, 10.0 );
labelSettings.priority = std::min( textSize / ( context.pixelSizeConversionFactor() * 3 ), 10.0 );
}
labelSettings.setFormat( format );