Don't output 'font = null' in the renderer when saving widgets to a file

0.8
Bruno Van de Velde 2017-07-30 15:20:14 +02:00
parent 4e1ff679ef
commit b05b9851cd
1 changed files with 4 additions and 0 deletions

View File

@ -101,6 +101,10 @@ namespace tgui
node->children.back()->name = "Renderer";
for (const auto& pair : widget->getRenderer()->getPropertyValuePairs())
{
// Skip "font = null"
if (pair.first == "font" && ObjectConverter{pair.second}.getString() == "null")
continue;
sf::String value = ObjectConverter{pair.second}.getString();
if (pair.second.getType() == ObjectConverter::Type::RendererData)
{