aboutsummaryrefslogtreecommitdiff
path: root/scene/gui/popup.cpp
diff options
context:
space:
mode:
authorJuan Linietsky2017-08-20 12:55:46 -0300
committerGitHub2017-08-20 12:55:46 -0300
commit541fdffc0ab2115238fe9cedbf1c088b15f11fdf (patch)
tree187c5d0278e5075907fef8a86b4d00d6a0b7161a /scene/gui/popup.cpp
parent831e21e89ba0275b43b6a351e538256b8ce715a3 (diff)
parent90b8a5b71ef79e0339826507c4b290f0c51b7cd2 (diff)
downloadgodot-541fdffc0ab2115238fe9cedbf1c088b15f11fdf.tar.gz
godot-541fdffc0ab2115238fe9cedbf1c088b15f11fdf.tar.zst
godot-541fdffc0ab2115238fe9cedbf1c088b15f11fdf.zip
Diffstat (limited to 'scene/gui/popup.cpp')
-rw-r--r--scene/gui/popup.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/scene/gui/popup.cpp b/scene/gui/popup.cpp
index b21139f96..a0cd0eca8 100644
--- a/scene/gui/popup.cpp
+++ b/scene/gui/popup.cpp
@@ -28,6 +28,8 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
#include "popup.h"
+
+#include "engine.h"
#include "os/keyboard.h"
void Popup::_gui_input(Ref<InputEvent> p_event) {
@@ -48,7 +50,7 @@ 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)) {
+ if (Engine::get_singleton()->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