summaryrefslogtreecommitdiff
path: root/editor/doc
diff options
context:
space:
mode:
Diffstat (limited to 'editor/doc')
-rw-r--r--editor/doc/doc_data.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/editor/doc/doc_data.cpp b/editor/doc/doc_data.cpp
index 3fd9e3182d..38ff9cd5fc 100644
--- a/editor/doc/doc_data.cpp
+++ b/editor/doc/doc_data.cpp
@@ -555,9 +555,11 @@ void DocData::generate(bool p_basic_types) {
argument_doc_from_arginfo(ad, mi.arguments[j]);
ad.name = arginfo.name;
- int defarg = mi.default_arguments.size() - mi.arguments.size() + j;
- if (defarg >= 0)
- ad.default_value = mi.default_arguments[defarg];
+ int darg_idx = mi.default_arguments.size() - mi.arguments.size() + j;
+ if (darg_idx >= 0) {
+ Variant default_arg = mi.default_arguments[darg_idx];
+ ad.default_value = default_arg.get_construct_string();
+ }
method.arguments.push_back(ad);
}
@@ -674,7 +676,6 @@ void DocData::generate(bool p_basic_types) {
argument_doc_from_arginfo(ad, mi.arguments[j]);
int darg_idx = j - (mi.arguments.size() - mi.default_arguments.size());
-
if (darg_idx >= 0) {
Variant default_arg = E->get().default_arguments[darg_idx];
ad.default_value = default_arg.get_construct_string();