diff options
author | Tomasz Chabora <kobewi4e@gmail.com> | 2020-08-25 01:32:58 +0200 |
---|---|---|
committer | kobewi <kobewi4e@gmail.com> | 2021-02-26 14:40:28 +0100 |
commit | 8df22a03c48ec809fa9c56f15083963e6cfeb885 (patch) | |
tree | c7f9a993bded6efd66df206eb1cab83bf469300a /scene | |
parent | 8ba67b728e63df81c19ea872f0a0b808edd519d2 (diff) |
Allow to create a node at specific position
Diffstat (limited to 'scene')
-rw-r--r-- | scene/gui/control.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp index ad21c351d0..10f1d33e56 100644 --- a/scene/gui/control.cpp +++ b/scene/gui/control.cpp @@ -93,7 +93,7 @@ void Control::_edit_set_state(const Dictionary &p_state) { void Control::_edit_set_position(const Point2 &p_position) { #ifdef TOOLS_ENABLED - set_position(p_position, CanvasItemEditor::get_singleton()->is_anchors_mode_enabled()); + set_position(p_position, CanvasItemEditor::get_singleton()->is_anchors_mode_enabled() && Object::cast_to<Control>(data.parent)); #else // Unlikely to happen. TODO: enclose all _edit_ functions into TOOLS_ENABLED set_position(p_position); |