From 52165fa12de7ca76898a7c1855a2f23797b2c2ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Tue, 9 Jan 2018 16:52:46 +0100 Subject: [PATCH] Fix bindings of EditorSettings.set_initial_value Also ran doctool. --- doc/classes/EditorSettings.xml | 2 ++ doc/classes/VehicleBody.xml | 17 +---------------- editor/editor_settings.cpp | 6 +++--- 3 files changed, 6 insertions(+), 19 deletions(-) diff --git a/doc/classes/EditorSettings.xml b/doc/classes/EditorSettings.xml index 174b62fde00..da6ecebcbaf 100644 --- a/doc/classes/EditorSettings.xml +++ b/doc/classes/EditorSettings.xml @@ -126,6 +126,8 @@ + + diff --git a/doc/classes/VehicleBody.xml b/doc/classes/VehicleBody.xml index 77916a7e9f9..4256ddd674a 100644 --- a/doc/classes/VehicleBody.xml +++ b/doc/classes/VehicleBody.xml @@ -1,5 +1,5 @@ - + @@ -9,27 +9,12 @@ - - - - - Returns the VehicleBody's velocity vector. To get the absolute speed in scalar value, get the length of the return vector in pixels/second. Example: - [codeblock] - # vehicle is an instance of VehicleBody - var speed = vehicle.get_linear_velocity().length() - [/codeblock] - - - - - - diff --git a/editor/editor_settings.cpp b/editor/editor_settings.cpp index 7081bb925fb..d3e3269c42f 100644 --- a/editor/editor_settings.cpp +++ b/editor/editor_settings.cpp @@ -992,7 +992,7 @@ void EditorSettings::raise_order(const String &p_setting) { props[p_setting].order = ++last_order; } -void EditorSettings::set_initial_value(const StringName &p_setting, const Variant &p_value, bool update_current) { +void EditorSettings::set_initial_value(const StringName &p_setting, const Variant &p_value, bool p_update_current) { _THREAD_SAFE_METHOD_ @@ -1000,7 +1000,7 @@ void EditorSettings::set_initial_value(const StringName &p_setting, const Varian return; props[p_setting].initial = p_value; props[p_setting].has_default_value = true; - if (update_current) { + if (p_update_current) { set(p_setting, p_value); } } @@ -1436,7 +1436,7 @@ void EditorSettings::_bind_methods() { ClassDB::bind_method(D_METHOD("set_setting", "name", "value"), &EditorSettings::set_setting); ClassDB::bind_method(D_METHOD("get_setting", "name"), &EditorSettings::get_setting); ClassDB::bind_method(D_METHOD("erase", "property"), &EditorSettings::erase); - ClassDB::bind_method(D_METHOD("set_initial_value", "name", "value"), &EditorSettings::set_initial_value); + ClassDB::bind_method(D_METHOD("set_initial_value", "name", "value", "update_current"), &EditorSettings::set_initial_value); ClassDB::bind_method(D_METHOD("property_can_revert", "name"), &EditorSettings::property_can_revert); ClassDB::bind_method(D_METHOD("property_get_revert", "name"), &EditorSettings::property_get_revert); ClassDB::bind_method(D_METHOD("add_property_info", "info"), &EditorSettings::_add_property_info_bind);