Create EditorHelpHighlighter in Project Manager
so that it works in Editor Settings opened without loading a project. (cherry picked from commit 86d336e1e0e32f61c457291351bb9b7e7c2c66c1)
This commit is contained in:
@@ -38,6 +38,7 @@
|
||||
#include "core/os/os.h"
|
||||
#include "core/version.h"
|
||||
#include "editor/asset_library/asset_library_editor_plugin.h"
|
||||
#include "editor/doc/editor_help.h"
|
||||
#include "editor/editor_string_names.h"
|
||||
#include "editor/gui/editor_about.h"
|
||||
#include "editor/gui/editor_file_dialog.h"
|
||||
@@ -75,6 +76,8 @@
|
||||
#include "servers/physics_3d/physics_server_3d.h"
|
||||
#endif // PHYSICS_3D_DISABLED
|
||||
|
||||
#include "modules/modules_enabled.gen.h" // For gdscript, mono. (For editor help highlighter).
|
||||
|
||||
constexpr int GODOT4_CONFIG_VERSION = 5;
|
||||
|
||||
ProjectManager *ProjectManager::singleton = nullptr;
|
||||
@@ -1383,6 +1386,10 @@ ProjectManager::ProjectManager() {
|
||||
OS::get_singleton()->set_low_processor_usage_mode(true);
|
||||
}
|
||||
|
||||
#if defined(MODULE_GDSCRIPT_ENABLED) || defined(MODULE_MONO_ENABLED)
|
||||
EditorHelpHighlighter::create_singleton();
|
||||
#endif
|
||||
|
||||
SceneTree::get_singleton()->get_root()->connect("files_dropped", callable_mp(this, &ProjectManager::_files_dropped));
|
||||
|
||||
// Initialize UI.
|
||||
@@ -1970,6 +1977,11 @@ ProjectManager::ProjectManager() {
|
||||
ProjectManager::~ProjectManager() {
|
||||
singleton = nullptr;
|
||||
EditorInspector::cleanup_plugins();
|
||||
|
||||
#if defined(MODULE_GDSCRIPT_ENABLED) || defined(MODULE_MONO_ENABLED)
|
||||
EditorHelpHighlighter::free_singleton();
|
||||
#endif
|
||||
|
||||
if (EditorSettings::get_singleton()) {
|
||||
EditorSettings::destroy();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user