aboutsummaryrefslogtreecommitdiff
path: root/scene/gui/control.cpp
diff options
context:
space:
mode:
authorIgnacio Etcheverry2017-08-19 01:02:56 +0200
committerIgnacio Etcheverry2017-08-19 01:29:45 +0200
commit90b8a5b71ef79e0339826507c4b290f0c51b7cd2 (patch)
tree6f24bbc63ef9674687589f9ec9017e9fd09d266e /scene/gui/control.cpp
parentfd69604bd9dc743494a7818f25f384cc7f521b33 (diff)
downloadgodot-90b8a5b71ef79e0339826507c4b290f0c51b7cd2.tar.gz
godot-90b8a5b71ef79e0339826507c4b290f0c51b7cd2.tar.zst
godot-90b8a5b71ef79e0339826507c4b290f0c51b7cd2.zip
Diffstat (limited to 'scene/gui/control.cpp')
-rw-r--r--scene/gui/control.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp
index 01570e28c..8d934d0a4 100644
--- a/scene/gui/control.cpp
+++ b/scene/gui/control.cpp
@@ -1353,7 +1353,7 @@ void Control::set_anchor(Margin p_margin, AnchorType p_anchor, bool p_keep_margi
void Control::_set_anchor(Margin p_margin, AnchorType p_anchor) {
#ifdef TOOLS_ENABLED
- if (is_inside_tree() && get_tree()->is_editor_hint()) {
+ if (is_inside_tree() && Engine::get_singleton()->is_editor_hint()) {
set_anchor(p_margin, p_anchor, EDITOR_DEF("editors/2d/keep_margins_when_changing_anchors", false));
} else {
set_anchor(p_margin, p_anchor, false);