diff options
author | codecustard <emmanuelbarroga@gmail.com> | 2019-11-05 05:59:03 -0800 |
---|---|---|
committer | codecustard <emmanuelbarroga@gmail.com> | 2019-11-05 05:59:03 -0800 |
commit | f643786b96a0ccf10e587eeed60e858cd2f713c0 (patch) | |
tree | 6eaeadb55f0edd262436c205a1691046b5f9b28b | |
parent | 23a381d8827dbcb2d295fa393a5400f7a7e0a1c1 (diff) |
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.
-rw-r--r-- | editor/plugins/canvas_item_editor_plugin.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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<InputEvent> &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<InputEvent> &p_event) { } drag_type = DRAG_PIVOT; - _save_canvas_item_state(drag_selection); } return true; } |