1
0
mirror of synced 2025-02-16 10:32:35 +01:00

impr: Properly clear pattern editor when closing last provider

This commit is contained in:
WerWolv 2024-03-15 21:07:21 +01:00
parent 5aa1046541
commit 31c93c8c5c
2 changed files with 2 additions and 6 deletions

View File

@ -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<u8> &data, Region region) {