Fix wrong cast to Node2D instead of Control
As reported by @sanikoyes.
This commit is contained in:
parent
025f3501ed
commit
095f0c956e
1 changed files with 1 additions and 1 deletions
|
@ -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 a new issue