From 37bf2831956173516ff4824c092ac49dd0f5219d Mon Sep 17 00:00:00 2001 From: Tomasz Chabora Date: Wed, 25 Sep 2019 16:56:44 +0200 Subject: [PATCH] Clean snapping lines after resize --- editor/plugins/canvas_item_editor_plugin.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp index 78873e739b2..4d4653d1110 100644 --- a/editor/plugins/canvas_item_editor_plugin.cpp +++ b/editor/plugins/canvas_item_editor_plugin.cpp @@ -1749,6 +1749,9 @@ bool CanvasItemEditor::_gui_input_resize(const Ref &p_event) { if (key_auto_insert_button->is_pressed()) { _insert_animation_keys(false, false, true, true); } + + snap_target[0] = SNAP_TARGET_NONE; + snap_target[1] = SNAP_TARGET_NONE; drag_type = DRAG_NONE; viewport->update(); return true; @@ -1757,6 +1760,8 @@ bool CanvasItemEditor::_gui_input_resize(const Ref &p_event) { // Cancel a drag if (b.is_valid() && b->get_button_index() == BUTTON_RIGHT && b->is_pressed()) { _restore_canvas_item_state(drag_selection); + snap_target[0] = SNAP_TARGET_NONE; + snap_target[1] = SNAP_TARGET_NONE; drag_type = DRAG_NONE; viewport->update(); return true;