diff options
Diffstat (limited to 'editor/editor_node.cpp')
-rw-r--r-- | editor/editor_node.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index e1b69def14..b8d87cfe9f 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -165,6 +165,8 @@ #include <stdio.h> #include <stdlib.h> +#include "modules/modules_enabled.gen.h" // For gdscript, mono. + EditorNode *EditorNode::singleton = nullptr; static const String EDITOR_NODE_CONFIG_SECTION = "EditorNode"; @@ -576,6 +578,9 @@ void EditorNode::_notification(int p_what) { switch (p_what) { case NOTIFICATION_POSTINITIALIZE: { EditorHelp::generate_doc(); +#if defined(MODULE_GDSCRIPT_ENABLED) || defined(MODULE_MONO_ENABLED) + EditorHelpHighlighter::create_singleton(); +#endif } break; case NOTIFICATION_PROCESS: { @@ -801,6 +806,12 @@ void EditorNode::_notification(int p_what) { _update_update_spinner(); _update_vsync_mode(); } + +#if defined(MODULE_GDSCRIPT_ENABLED) || defined(MODULE_MONO_ENABLED) + if (EditorSettings::get_singleton()->check_changed_settings_in_group("text_editor/theme/highlighting")) { + EditorHelpHighlighter::get_singleton()->reset_cache(); + } +#endif } break; } } @@ -7420,6 +7431,9 @@ EditorNode::~EditorNode() { remove_print_handler(&print_handler); EditorHelp::cleanup_doc(); +#if defined(MODULE_GDSCRIPT_ENABLED) || defined(MODULE_MONO_ENABLED) + EditorHelpHighlighter::free_singleton(); +#endif memdelete(editor_selection); memdelete(editor_plugins_over); memdelete(editor_plugins_force_over); |