diff options
-rw-r--r-- | editor/plugins/canvas_item_editor_plugin.cpp | 8 | ||||
-rw-r--r-- | modules/gdscript/gdscript_parser.cpp | 1 | ||||
-rw-r--r-- | modules/visual_script/visual_script_editor.cpp | 3 |
3 files changed, 4 insertions, 8 deletions
diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp index 31dd20e453..45f7f36cbd 100644 --- a/editor/plugins/canvas_item_editor_plugin.cpp +++ b/editor/plugins/canvas_item_editor_plugin.cpp @@ -1696,13 +1696,7 @@ bool CanvasItemEditor::_gui_input_scale(const Ref<InputEvent> &p_event) { if (drag_type == DRAG_SCALE_BOTH) { Size2 scale_factor = drag_to_local / drag_from_local; if (uniform) { - if (ABS(offset.x) > ABS(offset.y)) { - scale.x *= scale_factor.x; - scale.y = scale.x * ratio; - } else { - scale.y *= scale_factor.y; - scale.x = scale.y / ratio; - } + scale *= (scale_factor.x + scale_factor.y) / 2.0; } else { scale *= scale_factor; } diff --git a/modules/gdscript/gdscript_parser.cpp b/modules/gdscript/gdscript_parser.cpp index 3e5ad7c99b..1d26700fa0 100644 --- a/modules/gdscript/gdscript_parser.cpp +++ b/modules/gdscript/gdscript_parser.cpp @@ -4353,6 +4353,7 @@ void GDScriptParser::_parse_class(ClassNode *p_class) { current_export.type = Variant::INT; current_export.hint = is_flags ? PROPERTY_HINT_FLAGS : PROPERTY_HINT_ENUM; + current_export.usage |= PROPERTY_USAGE_SCRIPT_VARIABLE; Dictionary enum_values = constant; List<Variant> keys; diff --git a/modules/visual_script/visual_script_editor.cpp b/modules/visual_script/visual_script_editor.cpp index a80a015ed3..03f3e67e5d 100644 --- a/modules/visual_script/visual_script_editor.cpp +++ b/modules/visual_script/visual_script_editor.cpp @@ -765,6 +765,7 @@ void VisualScriptEditor::_update_graph(int p_only_id) { } void VisualScriptEditor::_update_members() { + ERR_FAIL_COND(!script.is_valid()); updating_members = true; @@ -3061,7 +3062,7 @@ void VisualScriptEditor::_notification(int p_what) { } } - if (is_visible_in_tree()) { + if (is_visible_in_tree() && script.is_valid()) { _update_members(); _update_graph(); } |