Skip to content
Permalink
Browse files

Default to follow placement alignment for labels

(cherry-picked from dc9ed2b)
  • Loading branch information
nyalldawson committed Aug 9, 2016
1 parent f6519fa commit 27a41681e1ce8437a9d003a84419c9f15be09c12
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/core/qgspallabeling.cpp
@@ -133,7 +133,7 @@ QgsPalLayerSettings::QgsPalLayerSettings()
// text formatting
wrapChar = "";
multilineHeight = 1.0;
multilineAlign = MultiLeft;
multilineAlign = MultiFollowPlacement;
addDirectionSymbol = false;
leftDirectionSymbol = QString( "<" );
rightDirectionSymbol = QString( ">" );
@@ -856,7 +856,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();
@@ -1308,7 +1308,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", ">" );

0 comments on commit 27a4168

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