Skip to content

Commit

Permalink
Merge pull request godotengine#32341 from KoBeWi/be_gone
Browse files Browse the repository at this point in the history
Clean snapping lines after resize
  • Loading branch information
akien-mga authored Sep 25, 2019
2 parents c5b2ce8 + 37bf283 commit e426169
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions editor/plugins/canvas_item_editor_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down

0 comments on commit e426169

Please sign in to comment.