diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2021-03-01 15:48:53 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-01 15:48:53 +0100 |
commit | ec7053259b5db8caab3a0a2c5763b03c9c3ca887 (patch) | |
tree | d7dde9af3860571820214a2ddfb0e742141d77ed /scene/gui | |
parent | bd42a6c51e384f55bbfda9ce64f85b471dbabda6 (diff) | |
parent | 8df22a03c48ec809fa9c56f15083963e6cfeb885 (diff) |
Merge pull request #41437 from KoBeWi/put_it_here
Allow to create a node at specific position
Diffstat (limited to 'scene/gui')
-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 0c104bf318..bff3024e38 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); |