summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2017-07-08 09:42:48 +0200
committerRémi Verschelde <rverschelde@gmail.com>2017-07-08 09:42:48 +0200
commit095f0c956ed8d60756c81c2c12c79e7500d826f2 (patch)
tree76211bed5f2892077d8835a6a1e29a17b48bfc60 /editor
parent025f3501ed524c2815938139be85fd27d1fa07f3 (diff)
Fix wrong cast to Node2D instead of Control
As reported by @sanikoyes.
Diffstat (limited to 'editor')
-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 e51254f84b..7ce884a455 100644
--- a/editor/plugins/canvas_item_editor_plugin.cpp
+++ b/editor/plugins/canvas_item_editor_plugin.cpp
@@ -1170,7 +1170,7 @@ void CanvasItemEditor::_viewport_gui_input(const Ref<InputEvent> &p_event) {
canvas_item->edit_set_state(se->undo_state);
if (canvas_item->cast_to<Node2D>())
canvas_item->cast_to<Node2D>()->edit_set_pivot(se->undo_pivot);
- if (canvas_item->cast_to<Node2D>())
+ if (canvas_item->cast_to<Control>())
canvas_item->cast_to<Control>()->set_pivot_offset(se->undo_pivot);
}
}