fix: Highlighting not being cleared correctly in some cases
This commit is contained in:
parent
5e86f62a98
commit
da18428f27
@ -39,6 +39,7 @@ namespace hex::plugin::builtin {
|
||||
ImHexApi::Provider::markDirty();
|
||||
|
||||
EventManager::post<EventBookmarkCreated>(this->m_bookmarks->back());
|
||||
EventManager::post<EventHighlightingChanged>();
|
||||
});
|
||||
|
||||
// Draw hex editor background highlights for bookmarks
|
||||
@ -374,6 +375,7 @@ namespace hex::plugin::builtin {
|
||||
// Remove the bookmark that was marked for removal
|
||||
if (bookmarkToRemove != this->m_bookmarks->end()) {
|
||||
this->m_bookmarks->erase(bookmarkToRemove);
|
||||
EventManager::post<EventHighlightingChanged>();
|
||||
}
|
||||
}
|
||||
ImGui::EndChild();
|
||||
|
@ -451,6 +451,7 @@ namespace hex::plugin::builtin {
|
||||
}
|
||||
|
||||
this->m_occurrenceTree->clear();
|
||||
EventManager::post<EventHighlightingChanged>();
|
||||
|
||||
this->m_searchTask = TaskManager::createTask("hex.builtin.view.find.searching", searchRegion.getSize(), [this, settings = this->m_searchSettings, searchRegion](auto &task) {
|
||||
auto provider = ImHexApi::Provider::get();
|
||||
@ -478,6 +479,10 @@ namespace hex::plugin::builtin {
|
||||
|
||||
for (const auto &occurrence : this->m_foundOccurrences.get(provider))
|
||||
this->m_occurrenceTree->insert({ occurrence.region.getStartAddress(), occurrence.region.getEndAddress() }, occurrence);
|
||||
|
||||
TaskManager::doLater([] {
|
||||
EventManager::post<EventHighlightingChanged>();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
@ -821,7 +826,9 @@ namespace hex::plugin::builtin {
|
||||
if (ImGui::Button("hex.builtin.view.find.search.reset"_lang)) {
|
||||
this->m_foundOccurrences->clear();
|
||||
this->m_sortedOccurrences->clear();
|
||||
*this->m_occurrenceTree = {};
|
||||
this->m_occurrenceTree->clear();
|
||||
|
||||
EventManager::post<EventHighlightingChanged>();
|
||||
}
|
||||
}
|
||||
ImGui::EndDisabled();
|
||||
|
Loading…
Reference in New Issue
Block a user