Fixes bug where enumeration is not being saved

This commit is contained in:
Juan Linietsky 2017-11-24 18:43:52 -03:00
parent 2e5dfbdb4b
commit 2bc6db65c1

View file

@ -1081,9 +1081,9 @@ Error DocData::save_classes(const String &p_default_path, const Map<String, Stri
ConstantDoc &k = c.constants[i]; ConstantDoc &k = c.constants[i];
if (k.enumeration != String()) { if (k.enumeration != String()) {
_write_string(f, 2, "<constant name=\"" + k.name + "\" value=\"" + k.value + "\">");
} else {
_write_string(f, 2, "<constant name=\"" + k.name + "\" value=\"" + k.value + "\" enum=\"" + k.enumeration + "\">"); _write_string(f, 2, "<constant name=\"" + k.name + "\" value=\"" + k.value + "\" enum=\"" + k.enumeration + "\">");
} else {
_write_string(f, 2, "<constant name=\"" + k.name + "\" value=\"" + k.value + "\">");
} }
_write_string(f, 3, k.description.strip_edges().xml_escape()); _write_string(f, 3, k.description.strip_edges().xml_escape());
_write_string(f, 2, "</constant>"); _write_string(f, 2, "</constant>");