diff options
Diffstat (limited to 'editor')
-rw-r--r-- | editor/editor_node.cpp | 1 | ||||
-rw-r--r-- | editor/editor_translation_parser.cpp | 5 | ||||
-rw-r--r-- | editor/editor_translation_parser.h | 1 |
3 files changed, 7 insertions, 0 deletions
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index 7eb5b3094d..ce131e6a05 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -6799,6 +6799,7 @@ EditorNode::EditorNode() { EditorNode::~EditorNode() { EditorInspector::cleanup_plugins(); + EditorTranslationParser::get_singleton()->clean_parsers(); remove_print_handler(&print_handler); memdelete(EditorHelp::get_doc_data()); diff --git a/editor/editor_translation_parser.cpp b/editor/editor_translation_parser.cpp index 3f4864ad1e..da191fbc92 100644 --- a/editor/editor_translation_parser.cpp +++ b/editor/editor_translation_parser.cpp @@ -147,6 +147,11 @@ void EditorTranslationParser::remove_parser(const Ref<EditorTranslationParserPlu } } +void EditorTranslationParser::clean_parsers() { + standard_parsers.clear(); + custom_parsers.clear(); +} + EditorTranslationParser *EditorTranslationParser::get_singleton() { if (!singleton) { singleton = memnew(EditorTranslationParser); diff --git a/editor/editor_translation_parser.h b/editor/editor_translation_parser.h index 6d00bedfa4..fb8aa6ec9b 100644 --- a/editor/editor_translation_parser.h +++ b/editor/editor_translation_parser.h @@ -64,6 +64,7 @@ public: Ref<EditorTranslationParserPlugin> get_parser(const String &p_extension) const; void add_parser(const Ref<EditorTranslationParserPlugin> &p_parser, ParserType p_type); void remove_parser(const Ref<EditorTranslationParserPlugin> &p_parser, ParserType p_type); + void clean_parsers(); EditorTranslationParser(); ~EditorTranslationParser(); |