Skip to content

Commit 6ca2cc1

Browse files
committedFeb 5, 2017
Fix label font size unit from 2.x projects incorrectly restored (fix #16143)
1 parent c5546b0 commit 6ca2cc1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎src/core/qgstextrenderer.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1382,8 +1382,8 @@ void QgsTextFormat::readFromLayer( QgsVectorLayer* layer )
13821382

13831383
if ( layer->customProperty( QStringLiteral( "labeling/fontSizeUnit" ) ).toString().isEmpty() )
13841384
{
1385-
d->fontSizeUnits = layer->customProperty( QStringLiteral( "labeling/fontSizeInMapUnits" ), 0 ).toUInt() == 0 ?
1386-
QgsUnitTypes::RenderPoints : QgsUnitTypes::RenderMapUnits;
1385+
d->fontSizeUnits = layer->customProperty( QStringLiteral( "labeling/fontSizeInMapUnits" ), QVariant( false ) ).toBool() ?
1386+
QgsUnitTypes::RenderMapUnits : QgsUnitTypes::RenderPoints;
13871387
}
13881388
else
13891389
{

0 commit comments

Comments
 (0)
Please sign in to comment.