Merge pull request #93527 from matheusmdx/fix-snapping-lines-with-anchors

Fix snapping lines don't disappearing after drag anchors
This commit is contained in:
Rémi Verschelde 2024-06-29 13:04:00 +02:00
commit 3cce275589
No known key found for this signature in database
GPG key ID: C3336907360768E1

View file

@ -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;