Skip to content
Permalink
Browse files

[labeling] always consider data-defined property for line height

  • Loading branch information
nirvn committed Oct 9, 2018
1 parent 8fbb717 commit b4a22180212fd3357388486a3f8649a8795794f0
Showing with 8 additions and 13 deletions.
  1. +8 −13 src/core/qgspallabeling.cpp
@@ -3086,21 +3086,16 @@ void QgsPalLabeling::dataDefinedTextFormatting( QgsPalLayerSettings &tmpLyr,
tmpLyr.autoWrapLength = ddValues.value( QgsPalLayerSettings::AutoWrapLength ).toInt();
}

if ( !tmpLyr.wrapChar.isEmpty() || tmpLyr.getLabelExpression()->expression().contains( QLatin1String( "wordwrap" ) ) || tmpLyr.autoWrapLength > 0 )
if ( ddValues.contains( QgsPalLayerSettings::MultiLineHeight ) )
{
QgsTextFormat format = tmpLyr.format();
format.setLineHeight( ddValues.value( QgsPalLayerSettings::MultiLineHeight ).toDouble() );
tmpLyr.setFormat( format );
}

if ( ddValues.contains( QgsPalLayerSettings::MultiLineHeight ) )
{
QgsTextFormat format = tmpLyr.format();
format.setLineHeight( ddValues.value( QgsPalLayerSettings::MultiLineHeight ).toDouble() );
tmpLyr.setFormat( format );
}

if ( ddValues.contains( QgsPalLayerSettings::MultiLineAlignment ) )
{
tmpLyr.multilineAlign = static_cast< QgsPalLayerSettings::MultiLineAlign >( ddValues.value( QgsPalLayerSettings::MultiLineAlignment ).toInt() );
}

if ( ddValues.contains( QgsPalLayerSettings::MultiLineAlignment ) )
{
tmpLyr.multilineAlign = static_cast< QgsPalLayerSettings::MultiLineAlign >( ddValues.value( QgsPalLayerSettings::MultiLineAlignment ).toInt() );
}

if ( ddValues.contains( QgsPalLayerSettings::DirSymbDraw ) )

0 comments on commit b4a2218

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