mirror of
https://github.com/godotengine/godot.git
synced 2024-11-29 15:42:29 +00:00
Fix wrong cast to Node2D instead of Control
As reported by @sanikoyes.
This commit is contained in:
parent
025f3501ed
commit
095f0c956e
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user