Skip to content
Permalink
Browse files

Fix text renderer not respecting min/max mm scale for map units (fix #…

  • Loading branch information
nyalldawson committed Oct 24, 2016
1 parent a535601 commit e3517c6f4ca74360b8c99b6c5efc810b7327e0f0
Showing with 8 additions and 0 deletions.
  1. +8 −0 src/core/qgstextrenderer.cpp
@@ -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:

0 comments on commit e3517c6

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