Skip to content
Permalink
Browse files

Default to follow placement alignment for labels

  • Loading branch information
nyalldawson committed Aug 9, 2016
1 parent 66d4af3 commit dc9ed2b4b5f6a359c70a7bdcc45cb4e69f8090f8
Showing with 3 additions and 3 deletions.
  1. +3 −3 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", ">" );

0 comments on commit dc9ed2b

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