Skip to content

Commit db7346b

Browse files
committed
Expose ScriptEditor.clear_docs_from_script
1 parent d7bdc0b commit db7346b

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

doc/classes/ScriptEditor.xml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,14 @@
1010
<tutorials>
1111
</tutorials>
1212
<methods>
13+
<method name="clear_docs_from_script">
14+
<return type="void" />
15+
<param index="0" name="script" type="Script" />
16+
<description>
17+
Removes the documentation for the given [param script].
18+
[b]Note:[/b] This should be called whenever the script is changed to keep the open documentation state up to date.
19+
</description>
20+
</method>
1321
<method name="get_breakpoints">
1422
<return type="PackedStringArray" />
1523
<description>

editor/plugins/script_editor_plugin.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4153,6 +4153,7 @@ void ScriptEditor::_bind_methods() {
41534153

41544154
ClassDB::bind_method(D_METHOD("goto_help", "topic"), &ScriptEditor::goto_help);
41554155
ClassDB::bind_method(D_METHOD("update_docs_from_script", "script"), &ScriptEditor::update_docs_from_script);
4156+
ClassDB::bind_method(D_METHOD("clear_docs_from_script", "script"), &ScriptEditor::clear_docs_from_script);
41564157

41574158
ADD_SIGNAL(MethodInfo("editor_script_changed", PropertyInfo(Variant::OBJECT, "script", PROPERTY_HINT_RESOURCE_TYPE, "Script")));
41584159
ADD_SIGNAL(MethodInfo("script_close", PropertyInfo(Variant::OBJECT, "script", PROPERTY_HINT_RESOURCE_TYPE, "Script")));

0 commit comments

Comments
 (0)