Skip to content

Commit b40be8a

Browse files
author
mhugent
committed
Write / read strikeout and underline for label-ng. Fixes bug #3323
git-svn-id: http://svn.osgeo.org/qgis/trunk@14905 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 520cfc6 commit b40be8a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/core/qgspallabeling.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,8 @@ void QgsPalLayerSettings::readFromLayer( QgsVectorLayer* layer )
268268
int fontWeight = layer->customProperty( "labeling/fontWeight" ).toInt();
269269
bool fontItalic = layer->customProperty( "labeling/fontItalic" ).toBool();
270270
textFont = QFont( fontFamily, fontSize, fontWeight, fontItalic );
271+
textFont.setUnderline( layer->customProperty( "labeling/fontUnderline" ).toBool() );
272+
textFont.setStrikeOut( layer->customProperty( "labeling/fontStrikeout" ).toBool() );
271273
textFont.setPointSizeF( fontSize ); //double precision needed because of map units
272274
textColor = _readColor( layer, "labeling/textColor" );
273275
enabled = layer->customProperty( "labeling/enabled" ).toBool();
@@ -300,6 +302,8 @@ void QgsPalLayerSettings::writeToLayer( QgsVectorLayer* layer )
300302
layer->setCustomProperty( "labeling/fontSize", textFont.pointSizeF() );
301303
layer->setCustomProperty( "labeling/fontWeight", textFont.weight() );
302304
layer->setCustomProperty( "labeling/fontItalic", textFont.italic() );
305+
layer->setCustomProperty( "labeling/fontStrikeout", textFont.strikeOut() );
306+
layer->setCustomProperty( "labeling/fontUnderline", textFont.underline() );
303307

304308
_writeColor( layer, "labeling/textColor", textColor );
305309
layer->setCustomProperty( "labeling/enabled", enabled );

0 commit comments

Comments
 (0)