From f643786b96a0ccf10e587eeed60e858cd2f713c0 Mon Sep 17 00:00:00 2001 From: codecustard Date: Tue, 5 Nov 2019 05:59:03 -0800 Subject: Fixes improper undo state for pivot setting After setting the pivot of a node, if you undo.... it will not revert the pivot to the previous state. --- editor/plugins/canvas_item_editor_plugin.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp index 2d9a713cad..cf62d59352 100644 --- a/editor/plugins/canvas_item_editor_plugin.cpp +++ b/editor/plugins/canvas_item_editor_plugin.cpp @@ -1291,6 +1291,7 @@ bool CanvasItemEditor::_gui_input_pivot(const Ref &p_event) { // Start dragging if we still have nodes if (drag_selection.size() > 0) { + _save_canvas_item_state(drag_selection); drag_from = transform.affine_inverse().xform((b.is_valid()) ? b->get_position() : viewport->get_local_mouse_position()); Vector2 new_pos; if (drag_selection.size() == 1) { @@ -1304,7 +1305,6 @@ bool CanvasItemEditor::_gui_input_pivot(const Ref &p_event) { } drag_type = DRAG_PIVOT; - _save_canvas_item_state(drag_selection); } return true; } -- cgit v1.2.3