summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-11-05 15:54:53 +0100
committerGitHub <noreply@github.com>2019-11-05 15:54:53 +0100
commit245c99175c242bdc60a212cc84986b1a9ad5aa08 (patch)
tree5b29e87d4dc1125390ec70c15e7937891592245e
parent341f37aaeda971ad33df15293d36d393ed34d2af (diff)
parentf643786b96a0ccf10e587eeed60e858cd2f713c0 (diff)
Merge pull request #33361 from codecustard/master
Fixes improper undo state for pivot setting
-rw-r--r--editor/plugins/canvas_item_editor_plugin.cpp2
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 afebe2ba47..d84a67dba1 100644
--- a/editor/plugins/canvas_item_editor_plugin.cpp
+++ b/editor/plugins/canvas_item_editor_plugin.cpp
@@ -1315,6 +1315,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) {
@@ -1328,7 +1329,6 @@ bool CanvasItemEditor::_gui_input_pivot(const Ref<InputEvent> &p_event) {
}
drag_type = DRAG_PIVOT;
- _save_canvas_item_state(drag_selection);
}
return true;
}