aboutsummaryrefslogtreecommitdiff
path: root/scene/gui/popup.cpp
diff options
context:
space:
mode:
authorreduz2015-12-29 12:14:02 -0300
committerreduz2015-12-29 12:14:02 -0300
commit974e5362bcb9bf32ee5fdb13936a1231fec93567 (patch)
tree1f1e1d06fcedf34abff764e8086490d48c4da89e /scene/gui/popup.cpp
parent7d2d1442f83e6a7a57a1823a6cf5af53e5419d5f (diff)
downloadgodot-974e5362bcb9bf32ee5fdb13936a1231fec93567.tar.gz
godot-974e5362bcb9bf32ee5fdb13936a1231fec93567.tar.zst
godot-974e5362bcb9bf32ee5fdb13936a1231fec93567.zip
Diffstat (limited to 'scene/gui/popup.cpp')
-rw-r--r--scene/gui/popup.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/scene/gui/popup.cpp b/scene/gui/popup.cpp
index 43703c589..0f70b4ba9 100644
--- a/scene/gui/popup.cpp
+++ b/scene/gui/popup.cpp
@@ -48,9 +48,11 @@ void Popup::_notification(int p_what) {
if (p_what==NOTIFICATION_ENTER_TREE) {
//small helper to make editing of these easier in editor
+#ifdef TOOLS_ENABLED
if (get_tree()->is_editor_hint() && get_tree()->get_edited_scene_root() && get_tree()->get_edited_scene_root()->is_a_parent_of(this)) {
set_as_toplevel(false);
}
+#endif
}
}