mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
Fix text renderer not respecting min/max mm scale for map units (fix #14698)
This commit is contained in:
parent
a5356011fc
commit
e3517c6f4c
@ -1627,6 +1627,14 @@ double QgsTextRenderer::scaleToPixelContext( double size, const QgsRenderContext
|
||||
{
|
||||
size = size / mapUnitsPerPixel * ( rasterfactor ? c.rasterScaleFactor() : 1 );
|
||||
}
|
||||
if ( unit == QgsUnitTypes::RenderMapUnits )
|
||||
{
|
||||
//check max/min size
|
||||
if ( mapUnitScale.minSizeMMEnabled )
|
||||
size = qMax( size, mapUnitScale.minSizeMM * c.scaleFactor() );
|
||||
if ( mapUnitScale.maxSizeMMEnabled )
|
||||
size = qMin( size, mapUnitScale.maxSizeMM * c.scaleFactor() );
|
||||
}
|
||||
break;
|
||||
|
||||
case QgsUnitTypes::RenderPixels:
|
||||
|
Loading…
x
Reference in New Issue
Block a user