1
0
Fork 0

apply custom widget fonts also to the legend, so that they show

up in list/textbox etc. (This should really be separately settable
via style definition, but it's very rarely used and a change now
is probably not worth it as we'll probably switch to osgWidget,
anyway.)
This commit is contained in:
mfranz 2009-01-09 11:58:28 +00:00 committed by Tim Moore
parent c9e8112a81
commit 41da00105c

View file

@ -711,10 +711,11 @@ FGDialog::setupObject (puObject * object, SGPropertyNode * props)
if (props->hasValue("border"))
object->setBorderThickness( props->getIntValue("border", 2) );
if ( SGPropertyNode *nft = props->getNode("font", false) ) {
if (SGPropertyNode *nft = props->getNode("font", false)) {
FGFontCache *fc = globals->get_fontcache();
puFont *lfnt = fc->get(nft);
object->setLabelFont(*lfnt);
object->setLegendFont(*lfnt);
} else {
object->setLabelFont(*_font);
}