summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormerumelu <merumelu@protonmail.com>2019-08-05 19:46:23 +0200
committermerumelu <merumelu@protonmail.com>2019-08-05 19:46:23 +0200
commitdcd551bf782c8f07e676c96717cf97c254adf0cd (patch)
tree1c415681989972b29b051db63e02973d43804024
parentb16d799a6fba50efb199e2a04b1beab0704f247f (diff)
Remove Editor dependency from SceneTree
-rw-r--r--editor/editor_node.cpp5
-rw-r--r--scene/main/scene_tree.cpp17
2 files changed, 7 insertions, 15 deletions
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp
index faa936bd64..8e6c7bf583 100644
--- a/editor/editor_node.cpp
+++ b/editor/editor_node.cpp
@@ -334,6 +334,11 @@ void EditorNode::_notification(int p_what) {
OS::get_singleton()->set_low_processor_usage_mode_sleep_usec(int(EDITOR_GET("interface/editor/unfocused_low_processor_mode_sleep_usec")));
} break;
+ case MainLoop::NOTIFICATION_WM_ABOUT: {
+
+ show_about();
+ } break;
+
case MainLoop::NOTIFICATION_WM_QUIT_REQUEST: {
_menu_option_confirm(FILE_QUIT, false);
diff --git a/scene/main/scene_tree.cpp b/scene/main/scene_tree.cpp
index dbf3150ae0..2668acd3d5 100644
--- a/scene/main/scene_tree.cpp
+++ b/scene/main/scene_tree.cpp
@@ -37,7 +37,6 @@
#include "core/os/os.h"
#include "core/print_string.h"
#include "core/project_settings.h"
-#include "editor/editor_node.h"
#include "main/input_default.h"
#include "node.h"
#include "scene/resources/dynamic_font.h"
@@ -647,7 +646,8 @@ void SceneTree::_notification(int p_notification) {
case NOTIFICATION_WM_MOUSE_ENTER:
case NOTIFICATION_WM_MOUSE_EXIT:
case NOTIFICATION_WM_FOCUS_IN:
- case NOTIFICATION_WM_FOCUS_OUT: {
+ case NOTIFICATION_WM_FOCUS_OUT:
+ case NOTIFICATION_WM_ABOUT: {
if (p_notification == NOTIFICATION_WM_FOCUS_IN) {
InputDefault *id = Object::cast_to<InputDefault>(Input::get_singleton());
@@ -671,19 +671,6 @@ void SceneTree::_notification(int p_notification) {
} break;
- case NOTIFICATION_WM_ABOUT: {
-
-#ifdef TOOLS_ENABLED
- if (EditorNode::get_singleton()) {
- EditorNode::get_singleton()->show_about();
- } else {
-#endif
- get_root()->propagate_notification(p_notification);
-#ifdef TOOLS_ENABLED
- }
-#endif
- } break;
-
case NOTIFICATION_CRASH: {
get_root()->propagate_notification(p_notification);