@@ -268,6 +268,8 @@ void QgsPalLayerSettings::readFromLayer( QgsVectorLayer* layer )
268
268
int fontWeight = layer->customProperty ( " labeling/fontWeight" ).toInt ();
269
269
bool fontItalic = layer->customProperty ( " labeling/fontItalic" ).toBool ();
270
270
textFont = QFont ( fontFamily, fontSize, fontWeight, fontItalic );
271
+ textFont.setUnderline ( layer->customProperty ( " labeling/fontUnderline" ).toBool () );
272
+ textFont.setStrikeOut ( layer->customProperty ( " labeling/fontStrikeout" ).toBool () );
271
273
textFont.setPointSizeF ( fontSize ); // double precision needed because of map units
272
274
textColor = _readColor ( layer, " labeling/textColor" );
273
275
enabled = layer->customProperty ( " labeling/enabled" ).toBool ();
@@ -300,6 +302,8 @@ void QgsPalLayerSettings::writeToLayer( QgsVectorLayer* layer )
300
302
layer->setCustomProperty ( " labeling/fontSize" , textFont.pointSizeF () );
301
303
layer->setCustomProperty ( " labeling/fontWeight" , textFont.weight () );
302
304
layer->setCustomProperty ( " labeling/fontItalic" , textFont.italic () );
305
+ layer->setCustomProperty ( " labeling/fontStrikeout" , textFont.strikeOut () );
306
+ layer->setCustomProperty ( " labeling/fontUnderline" , textFont.underline () );
303
307
304
308
_writeColor ( layer, " labeling/textColor" , textColor );
305
309
layer->setCustomProperty ( " labeling/enabled" , enabled );
0 commit comments