Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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
  • Loading branch information
mhugent committed Dec 13, 2010
1 parent 520cfc6 commit b40be8a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/core/qgspallabeling.cpp
Expand Up @@ -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();
Expand Down Expand Up @@ -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 );
Expand Down

0 comments on commit b40be8a

Please sign in to comment.