impr: Properly clear pattern editor when closing last provider
This commit is contained in:
parent
5aa1046541
commit
31c93c8c5c
@ -170,7 +170,7 @@ namespace hex::plugin::builtin {
|
||||
u32 color;
|
||||
};
|
||||
|
||||
std::unique_ptr<pl::PatternLanguage> m_editorRuntime;
|
||||
std::unique_ptr<pl::PatternLanguage> m_editorRuntime;
|
||||
|
||||
PerProvider<std::vector<std::fs::path>> m_possiblePatternFiles;
|
||||
bool m_runAutomatically = false;
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user