Skip to content

Commit

Permalink
Merge pull request #55333 from pablodp606/fix-offset-drag
Browse files Browse the repository at this point in the history
Fix offset in CanvasItem drag movement
  • Loading branch information
akien-mga authored Nov 27, 2021
2 parents e734a7a + cfacd9c commit 52b7d5f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion editor/plugins/canvas_item_editor_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2339,7 +2339,7 @@ bool CanvasItemEditor::_gui_input_select(const Ref<InputEvent> &p_event) {

if (selection2.size() > 0) {
drag_type = DRAG_MOVE;
drag_from = click;
drag_from = drag_start_origin;
_save_canvas_item_state(drag_selection);
}
return true;
Expand Down
2 changes: 1 addition & 1 deletion editor/plugins/node_3d_editor_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1749,7 +1749,7 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
} else {
const bool movement_threshold_passed = _edit.original_mouse_pos.distance_to(_edit.mouse_pos) > 8 * EDSCALE;
if (clicked.is_valid() && movement_threshold_passed) {
_compute_edit(_edit.mouse_pos);
_compute_edit(_edit.original_mouse_pos);
clicked = ObjectID();

_edit.mode = TRANSFORM_TRANSLATE;
Expand Down

0 comments on commit 52b7d5f

Please sign in to comment.