1
0
mirror of synced 2024-11-24 15:50:16 +01:00

fix: Future proof the previous fix

This commit is contained in:
WerWolv 2023-09-03 16:18:29 +02:00
parent b042b8327a
commit 563ff5a774
2 changed files with 3 additions and 3 deletions

View File

@ -27,6 +27,9 @@ namespace hex::prv {
Provider::~Provider() {
this->m_overlays.clear();
if (auto selection = ImHexApi::HexEditor::getSelection(); selection.has_value() && selection->provider == this)
EventManager::post<EventRegionSelected>(ImHexApi::HexEditor::ProviderRegion { { 0x00, 0x00 }, nullptr });
}
void Provider::read(u64 offset, void *buffer, size_t size, bool overlays) {

View File

@ -526,9 +526,6 @@ namespace hex::plugin::builtin {
dataProvider->writeRaw(0x00, section.data.data(), section.data.size());
dataProvider->setReadOnly(true);
if (auto selection = ImHexApi::HexEditor::getSelection(); selection.has_value() && selection->provider != ImHexApi::Provider::get())
EventManager::post<EventRegionSelected>(ImHexApi::HexEditor::ProviderRegion { { 0x00, 0x00 }, nullptr });
auto hexEditor = auto(this->m_sectionHexEditor);
hexEditor.setBackgroundHighlightCallback([this, id, &runtime](u64 address, const u8 *, size_t) -> std::optional<color_t> {