impr: Properly clear pattern editor when closing last provider
This commit is contained in:
parent
5aa1046541
commit
31c93c8c5c
@ -1686,12 +1686,8 @@ namespace hex::plugin::builtin {
|
|||||||
|
|
||||||
if (newProvider != nullptr)
|
if (newProvider != nullptr)
|
||||||
m_textEditor.SetText(m_sourceCode.get(newProvider));
|
m_textEditor.SetText(m_sourceCode.get(newProvider));
|
||||||
});
|
else
|
||||||
|
|
||||||
EventProviderClosed::subscribe(this, [this](prv::Provider *) {
|
|
||||||
if (ImHexApi::Provider::getProviders().empty()) {
|
|
||||||
m_textEditor.SetText("");
|
m_textEditor.SetText("");
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
RequestAddVirtualFile::subscribe(this, [this](const std::fs::path &path, const std::vector<u8> &data, Region region) {
|
RequestAddVirtualFile::subscribe(this, [this](const std::fs::path &path, const std::vector<u8> &data, Region region) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user