Fix label font size unit from 2.x projects incorrectly restored (fix #16143)

This commit is contained in:
Nyall Dawson 2017-02-06 08:32:32 +10:00
parent c5546b0357
commit 6ca2cc18ef

View File

@ -1382,8 +1382,8 @@ void QgsTextFormat::readFromLayer( QgsVectorLayer* layer )
if ( layer->customProperty( QStringLiteral( "labeling/fontSizeUnit" ) ).toString().isEmpty() )
{
d->fontSizeUnits = layer->customProperty( QStringLiteral( "labeling/fontSizeInMapUnits" ), 0 ).toUInt() == 0 ?
QgsUnitTypes::RenderPoints : QgsUnitTypes::RenderMapUnits;
d->fontSizeUnits = layer->customProperty( QStringLiteral( "labeling/fontSizeInMapUnits" ), QVariant( false ) ).toBool() ?
QgsUnitTypes::RenderMapUnits : QgsUnitTypes::RenderPoints;
}
else
{