From dc9ed2b4b5f6a359c70a7bdcc45cb4e69f8090f8 Mon Sep 17 00:00:00 2001 From: Nyall Dawson Date: Mon, 8 Aug 2016 13:23:56 +1000 Subject: [PATCH] Default to follow placement alignment for labels --- src/core/qgspallabeling.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core/qgspallabeling.cpp b/src/core/qgspallabeling.cpp index 96d9c5fd718..6480ad533ca 100644 --- a/src/core/qgspallabeling.cpp +++ b/src/core/qgspallabeling.cpp @@ -132,7 +132,7 @@ QgsPalLayerSettings::QgsPalLayerSettings() // text formatting wrapChar = ""; multilineHeight = 1.0; - multilineAlign = MultiLeft; + multilineAlign = MultiFollowPlacement; addDirectionSymbol = false; leftDirectionSymbol = QString( "<" ); rightDirectionSymbol = QString( ">" ); @@ -852,7 +852,7 @@ void QgsPalLayerSettings::readFromLayer( QgsVectorLayer* layer ) // text formatting wrapChar = layer->customProperty( "labeling/wrapChar" ).toString(); multilineHeight = layer->customProperty( "labeling/multilineHeight", QVariant( 1.0 ) ).toDouble(); - multilineAlign = static_cast< MultiLineAlign >( layer->customProperty( "labeling/multilineAlign", QVariant( MultiLeft ) ).toUInt() ); + multilineAlign = static_cast< MultiLineAlign >( layer->customProperty( "labeling/multilineAlign", QVariant( MultiFollowPlacement ) ).toUInt() ); addDirectionSymbol = layer->customProperty( "labeling/addDirectionSymbol" ).toBool(); leftDirectionSymbol = layer->customProperty( "labeling/leftDirectionSymbol", QVariant( "<" ) ).toString(); rightDirectionSymbol = layer->customProperty( "labeling/rightDirectionSymbol", QVariant( ">" ) ).toString(); @@ -1304,7 +1304,7 @@ void QgsPalLayerSettings::readXml( QDomElement& elem ) QDomElement textFormatElem = elem.firstChildElement( "text-format" ); wrapChar = textFormatElem.attribute( "wrapChar" ); multilineHeight = textFormatElem.attribute( "multilineHeight", "1" ).toDouble(); - multilineAlign = static_cast< MultiLineAlign >( textFormatElem.attribute( "multilineAlign", QString::number( MultiLeft ) ).toUInt() ); + multilineAlign = static_cast< MultiLineAlign >( textFormatElem.attribute( "multilineAlign", QString::number( MultiFollowPlacement ) ).toUInt() ); addDirectionSymbol = textFormatElem.attribute( "addDirectionSymbol" ).toInt(); leftDirectionSymbol = textFormatElem.attribute( "leftDirectionSymbol", "<" ); rightDirectionSymbol = textFormatElem.attribute( "rightDirectionSymbol", ">" );