mirror of
https://github.com/godotengine/godot.git
synced 2026-01-06 10:11:57 +03:00
Allow to create a node at specific position
This commit is contained in:
@@ -97,7 +97,7 @@ void Control::_edit_set_state(const Dictionary &p_state) {
|
||||
void Control::_edit_set_position(const Point2 &p_position) {
|
||||
#ifdef TOOLS_ENABLED
|
||||
ERR_FAIL_COND_MSG(!Engine::get_singleton()->is_editor_hint(), "This function can only be used from editor plugins.");
|
||||
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);
|
||||
|
||||
Reference in New Issue
Block a user