diff --git a/plugins/builtin/include/content/views/view_pattern_editor.hpp b/plugins/builtin/include/content/views/view_pattern_editor.hpp index 367736281..201510ff5 100644 --- a/plugins/builtin/include/content/views/view_pattern_editor.hpp +++ b/plugins/builtin/include/content/views/view_pattern_editor.hpp @@ -170,7 +170,7 @@ namespace hex::plugin::builtin { u32 color; }; - std::unique_ptr m_editorRuntime; + std::unique_ptr m_editorRuntime; PerProvider> m_possiblePatternFiles; bool m_runAutomatically = false; diff --git a/plugins/builtin/source/content/views/view_pattern_editor.cpp b/plugins/builtin/source/content/views/view_pattern_editor.cpp index beb755fc5..55ef798cf 100644 --- a/plugins/builtin/source/content/views/view_pattern_editor.cpp +++ b/plugins/builtin/source/content/views/view_pattern_editor.cpp @@ -1686,12 +1686,8 @@ namespace hex::plugin::builtin { if (newProvider != nullptr) m_textEditor.SetText(m_sourceCode.get(newProvider)); - }); - - EventProviderClosed::subscribe(this, [this](prv::Provider *) { - if (ImHexApi::Provider::getProviders().empty()) { + else m_textEditor.SetText(""); - } }); RequestAddVirtualFile::subscribe(this, [this](const std::fs::path &path, const std::vector &data, Region region) {