doctool: Fix writing theme_item descriptions
We already had support for parsing and saving theme_item descriptions
in DocData, and displaying it in the editor, but doctool would drop the
changes as it was not writing them back to the XML.
Part of #29868.
(cherry picked from commit 615ffb3507
)
This commit is contained in:
parent
67efb30f2a
commit
b8d29b5c66
|
@ -552,7 +552,7 @@
|
||||||
<theme_item name="number_color" type="Color">
|
<theme_item name="number_color" type="Color">
|
||||||
</theme_item>
|
</theme_item>
|
||||||
<theme_item name="read_only" type="StyleBox">
|
<theme_item name="read_only" type="StyleBox">
|
||||||
Sets the [StyleBox] of this [TextEdit] when [member read_only] is enabled.
|
Sets the [StyleBox] of this [TextEdit] when [member readonly] is enabled.
|
||||||
</theme_item>
|
</theme_item>
|
||||||
<theme_item name="safe_line_number_color" type="Color">
|
<theme_item name="safe_line_number_color" type="Color">
|
||||||
</theme_item>
|
</theme_item>
|
||||||
|
|
|
@ -1127,6 +1127,7 @@ Error DocData::save_classes(const String &p_default_path, const Map<String, Stri
|
||||||
|
|
||||||
const PropertyDoc &p = c.theme_properties[i];
|
const PropertyDoc &p = c.theme_properties[i];
|
||||||
_write_string(f, 2, "<theme_item name=\"" + p.name + "\" type=\"" + p.type + "\">");
|
_write_string(f, 2, "<theme_item name=\"" + p.name + "\" type=\"" + p.type + "\">");
|
||||||
|
_write_string(f, 3, p.description.strip_edges().xml_escape());
|
||||||
_write_string(f, 2, "</theme_item>");
|
_write_string(f, 2, "</theme_item>");
|
||||||
}
|
}
|
||||||
_write_string(f, 1, "</theme_items>");
|
_write_string(f, 1, "</theme_items>");
|
||||||
|
|
Loading…
Reference in New Issue