From fd59d17b22002c32dc409c3aea98deb988921c4c Mon Sep 17 00:00:00 2001 From: Franklin Sobrinho Date: Mon, 14 Dec 2015 16:31:37 -0300 Subject: [PATCH] Avoid project manager from processing gamepad input --- tools/editor/project_manager.cpp | 7 +++++++ tools/editor/project_manager.h | 1 + 2 files changed, 8 insertions(+) diff --git a/tools/editor/project_manager.cpp b/tools/editor/project_manager.cpp index 4db56ea2f9b..880df85c196 100644 --- a/tools/editor/project_manager.cpp +++ b/tools/editor/project_manager.cpp @@ -348,6 +348,13 @@ struct ProjectItem { _FORCE_INLINE_ bool operator ==(const ProjectItem& l) const { return project==l.project; } }; +void ProjectManager::_notification(int p_what) { + + if (p_what==NOTIFICATION_ENTER_TREE) { + + get_tree()->set_editor_hint(true); + } +} void ProjectManager::_panel_draw(Node *p_hb) { diff --git a/tools/editor/project_manager.h b/tools/editor/project_manager.h index 1e6ea9c1c90..f8edb6dc10d 100644 --- a/tools/editor/project_manager.h +++ b/tools/editor/project_manager.h @@ -85,6 +85,7 @@ class ProjectManager : public Control { protected: + void _notification(int p_what); static void _bind_methods(); public: ProjectManager();