Skip to content

Commit

Permalink
Merge pull request #93527 from matheusmdx/fix-snapping-lines-with-anc…
Browse files Browse the repository at this point in the history
…hors

Fix snapping lines don't disappearing after drag anchors
  • Loading branch information
akien-mga committed Jun 29, 2024
2 parents 3fbb604 + f746632 commit 3cce275
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 @@ -1687,13 +1687,18 @@ bool CanvasItemEditor::_gui_input_anchors(const Ref<InputEvent> &p_event) {
_commit_canvas_item_state(
drag_selection,
vformat(TTR("Move CanvasItem \"%s\" Anchor"), drag_selection.front()->get()->get_name()));
snap_target[0] = SNAP_TARGET_NONE;
snap_target[1] = SNAP_TARGET_NONE;
_reset_drag();
viewport->queue_redraw();
return true;
}

// Cancel a drag
if (ED_IS_SHORTCUT("canvas_item_editor/cancel_transform", p_event) || (b.is_valid() && b->get_button_index() == MouseButton::RIGHT && b->is_pressed())) {
_restore_canvas_item_state(drag_selection);
snap_target[0] = SNAP_TARGET_NONE;
snap_target[1] = SNAP_TARGET_NONE;
_reset_drag();
viewport->queue_redraw();
return true;
Expand Down

0 comments on commit 3cce275

Please sign in to comment.