Skip to content
Permalink
Browse files
Write / read strikeout and underline for label-ng. Fixes bug #3323
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@14905 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Dec 13, 2010
1 parent f1ba5fe commit c20865bae663487d68e0d17e744495c31fe5248a
Showing with 4 additions and 0 deletions.
  1. +4 −0 src/core/qgspallabeling.cpp
@@ -268,6 +268,8 @@ void QgsPalLayerSettings::readFromLayer( QgsVectorLayer* layer )
int fontWeight = layer->customProperty( "labeling/fontWeight" ).toInt();
bool fontItalic = layer->customProperty( "labeling/fontItalic" ).toBool();
textFont = QFont( fontFamily, fontSize, fontWeight, fontItalic );
textFont.setUnderline( layer->customProperty( "labeling/fontUnderline" ).toBool() );
textFont.setStrikeOut( layer->customProperty( "labeling/fontStrikeout" ).toBool() );
textFont.setPointSizeF( fontSize ); //double precision needed because of map units
textColor = _readColor( layer, "labeling/textColor" );
enabled = layer->customProperty( "labeling/enabled" ).toBool();
@@ -300,6 +302,8 @@ void QgsPalLayerSettings::writeToLayer( QgsVectorLayer* layer )
layer->setCustomProperty( "labeling/fontSize", textFont.pointSizeF() );
layer->setCustomProperty( "labeling/fontWeight", textFont.weight() );
layer->setCustomProperty( "labeling/fontItalic", textFont.italic() );
layer->setCustomProperty( "labeling/fontStrikeout", textFont.strikeOut() );
layer->setCustomProperty( "labeling/fontUnderline", textFont.underline() );

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

0 comments on commit c20865b

Please sign in to comment.