Skip to content

Commit

Permalink
Default to follow placement alignment for labels
Browse files Browse the repository at this point in the history
(cherry-picked from dc9ed2b)
  • Loading branch information
nyalldawson committed Aug 10, 2016
1 parent f6519fa commit 27a4168
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/core/qgspallabeling.cpp
Expand Up @@ -133,7 +133,7 @@ QgsPalLayerSettings::QgsPalLayerSettings()
// text formatting
wrapChar = "";
multilineHeight = 1.0;
multilineAlign = MultiLeft;
multilineAlign = MultiFollowPlacement;
addDirectionSymbol = false;
leftDirectionSymbol = QString( "<" );
rightDirectionSymbol = QString( ">" );
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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", ">" );
Expand Down

0 comments on commit 27a4168

Please sign in to comment.