summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2019-09-25 18:45:13 +0200
committerGitHub <noreply@github.com>2019-09-25 18:45:13 +0200
commite426169e4ce8cbb0a8c0fb04f75e60976058177e (patch)
treea74e1f4845b54a3c8e225cfd7419fd0c40ced491
parentc5b2ce8b06ed52e834984039be380bb97aa6ebf4 (diff)
parent37bf2831956173516ff4824c092ac49dd0f5219d (diff)
Merge pull request #32341 from KoBeWi/be_gone
Clean snapping lines after resize
-rw-r--r--editor/plugins/canvas_item_editor_plugin.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp
index 3b0c8b22ed..a11c35e5f2 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<InputEvent> &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<InputEvent> &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;