Don't create empty description nodes.
Other places e.g. Route::save_as_template(), Session::save_template() don't to that either.
This commit is contained in:
parent
1f6c54a2f0
commit
4c077010ad
@ -429,10 +429,12 @@ TemplateManager::save_template_desc ()
|
|||||||
}
|
}
|
||||||
|
|
||||||
tree.root()->remove_nodes_and_delete (X_("description"));
|
tree.root()->remove_nodes_and_delete (X_("description"));
|
||||||
XMLNode* desc = new XMLNode (X_("description"));
|
|
||||||
|
|
||||||
XMLNode* dn = new XMLNode (X_("content"), desc_txt);
|
if (!desc_txt.empty ()) {
|
||||||
desc->add_child_nocopy (*dn);
|
XMLNode* desc = new XMLNode (X_("description"));
|
||||||
|
XMLNode* dn = new XMLNode (X_("content"), desc_txt);
|
||||||
|
desc->add_child_nocopy (*dn);
|
||||||
|
}
|
||||||
|
|
||||||
tree.root()->add_child_nocopy (*desc);
|
tree.root()->add_child_nocopy (*desc);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user