From 87243508e9c2a3ac3b5af7ff7b300a38f62dca1e Mon Sep 17 00:00:00 2001 From: volzhs Date: Mon, 22 Feb 2016 18:13:27 +0900 Subject: [PATCH] keep previous rotation when using rotate tool. fixes #3788. --- tools/editor/plugins/canvas_item_editor_plugin.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/editor/plugins/canvas_item_editor_plugin.cpp b/tools/editor/plugins/canvas_item_editor_plugin.cpp index f3ff001d842..f8bc97a433d 100644 --- a/tools/editor/plugins/canvas_item_editor_plugin.cpp +++ b/tools/editor/plugins/canvas_item_editor_plugin.cpp @@ -1560,7 +1560,7 @@ void CanvasItemEditor::_viewport_input_event(const InputEvent& p_event) { Matrix32 rot; rot.elements[1] = (dfrom - center).normalized(); rot.elements[0] = rot.elements[1].tangent(); - node->set_rot(snap_angle(rot.xform_inv(dto-center).angle(), node->get_rot())); + node->set_rot(snap_angle(rot.xform_inv(dto-center).angle() + node->get_rot(), node->get_rot())); display_rotate_to = dto; display_rotate_from = center; viewport->update();