summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHugo Locurcio <hugo.locurcio@hugo.pro>2023-08-25 01:02:47 +0200
committerHugo Locurcio <hugo.locurcio@hugo.pro>2023-09-11 19:46:21 +0200
commit9359e0b91df3a29e339e673e2bfde3f46b74b364 (patch)
tree045061bcd0e898a09bde1afe1596cd27ebf254ad
parent221884e6bc260c38f16422081b7d4efd49a71375 (diff)
downloadredot-engine-9359e0b91df3a29e339e673e2bfde3f46b74b364.tar.gz
Add a property hint range to Auto Refresh Interval editor setting
This prevents using zero or negative values, which are invalid and will cause various issues in the editor (such as the inspector never updating until the editor is closed and reopened).
-rw-r--r--editor/editor_settings.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/editor/editor_settings.cpp b/editor/editor_settings.cpp
index e042d8570f..6433cb9967 100644
--- a/editor/editor_settings.cpp
+++ b/editor/editor_settings.cpp
@@ -531,7 +531,7 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
_initial_set("docks/filesystem/textfile_extensions", "txt,md,cfg,ini,log,json,yml,yaml,toml");
// Property editor
- _initial_set("docks/property_editor/auto_refresh_interval", 0.2); //update 5 times per second by default
+ EDITOR_SETTING(Variant::FLOAT, PROPERTY_HINT_RANGE, "docks/property_editor/auto_refresh_interval", 0.2, "0.01,1,0.001"); // Update 5 times per second by default.
EDITOR_SETTING(Variant::FLOAT, PROPERTY_HINT_RANGE, "docks/property_editor/subresource_hue_tint", 0.75, "0,1,0.01")
/* Text editor */