diff options
-rw-r--r-- | core/script_language.cpp | 6 | ||||
-rw-r--r-- | doc/classes/RigidBody2D.xml | 2 | ||||
-rw-r--r-- | editor/editor_data.cpp | 6 | ||||
-rw-r--r-- | modules/gdscript/editor/gdscript_highlighter.cpp | 7 | ||||
-rw-r--r-- | scene/resources/syntax_highlighter.cpp | 7 |
5 files changed, 25 insertions, 3 deletions
diff --git a/core/script_language.cpp b/core/script_language.cpp index b63aeb952c..bb2e9a07ff 100644 --- a/core/script_language.cpp +++ b/core/script_language.cpp @@ -275,7 +275,11 @@ void ScriptServer::save_global_classes() { gcarr.push_back(d); } - ProjectSettings::get_singleton()->set("_global_script_classes", gcarr); + if (gcarr.empty()) { + ProjectSettings::get_singleton()->clear("_global_script_classes"); + } else { + ProjectSettings::get_singleton()->set("_global_script_classes", gcarr); + } ProjectSettings::get_singleton()->save(); } diff --git a/doc/classes/RigidBody2D.xml b/doc/classes/RigidBody2D.xml index 101f29c43e..eca5b8054d 100644 --- a/doc/classes/RigidBody2D.xml +++ b/doc/classes/RigidBody2D.xml @@ -138,7 +138,7 @@ </member> <member name="contacts_reported" type="int" setter="set_max_contacts_reported" getter="get_max_contacts_reported" default="0"> The maximum number of contacts that will be recorded. Requires [member contact_monitor] to be set to [code]true[/code]. - [b]Note:[/b] The number of contacts is different from the number of collisions. Collisions between parallel edges will result in two contacts (one at each end), and collisions between parallel faces will result in four contacts (one at each corner). + [b]Note:[/b] The number of contacts is different from the number of collisions. Collisions between parallel edges will result in two contacts (one at each end). </member> <member name="continuous_cd" type="int" setter="set_continuous_collision_detection_mode" getter="get_continuous_collision_detection_mode" enum="RigidBody2D.CCDMode" default="0"> Continuous collision detection mode. diff --git a/editor/editor_data.cpp b/editor/editor_data.cpp index 5118ccacad..7537c86676 100644 --- a/editor/editor_data.cpp +++ b/editor/editor_data.cpp @@ -936,7 +936,11 @@ void EditorData::script_class_save_icon_paths() { } } - ProjectSettings::get_singleton()->set("_global_script_class_icons", d); + if (d.empty()) { + ProjectSettings::get_singleton()->clear("_global_script_class_icons"); + } else { + ProjectSettings::get_singleton()->set("_global_script_class_icons", d); + } ProjectSettings::get_singleton()->save(); } diff --git a/modules/gdscript/editor/gdscript_highlighter.cpp b/modules/gdscript/editor/gdscript_highlighter.cpp index 9a3273d201..7f7410a92c 100644 --- a/modules/gdscript/editor/gdscript_highlighter.cpp +++ b/modules/gdscript/editor/gdscript_highlighter.cpp @@ -73,6 +73,13 @@ Dictionary GDScriptSyntaxHighlighter::_get_line_syntax_highlighting(int p_line) color_region_cache[p_line] = -1; int in_region = -1; if (p_line != 0) { + int prev_region_line = p_line - 1; + while (prev_region_line > 0 && !color_region_cache.has(prev_region_line)) { + prev_region_line--; + } + for (int i = prev_region_line; i < p_line - 1; i++) { + get_line_syntax_highlighting(i); + } if (!color_region_cache.has(p_line - 1)) { get_line_syntax_highlighting(p_line - 1); } diff --git a/scene/resources/syntax_highlighter.cpp b/scene/resources/syntax_highlighter.cpp index 5d58e71fc5..e7b49892d8 100644 --- a/scene/resources/syntax_highlighter.cpp +++ b/scene/resources/syntax_highlighter.cpp @@ -149,6 +149,13 @@ Dictionary CodeHighlighter::_get_line_syntax_highlighting(int p_line) { color_region_cache[p_line] = -1; int in_region = -1; if (p_line != 0) { + int prev_region_line = p_line - 1; + while (prev_region_line > 0 && !color_region_cache.has(prev_region_line)) { + prev_region_line--; + } + for (int i = prev_region_line; i < p_line - 1; i++) { + get_line_syntax_highlighting(i); + } if (!color_region_cache.has(p_line - 1)) { get_line_syntax_highlighting(p_line - 1); } |