sys: Fixed global shortcuts not working correctly

Fixes #606
This commit is contained in:
WerWolv
2022-07-30 22:01:49 +02:00
parent a097f162a7
commit 3d5568f65f
14 changed files with 63 additions and 30 deletions

View File

@@ -42,7 +42,7 @@ namespace hex::plugin::builtin {
this->m_entropyHandlePosition = region.address / this->m_blockSize;
});
EventManager::subscribe<EventFileUnloaded>(this, [this] {
EventManager::subscribe<EventProviderDeleted>(this, [this](const auto*) {
this->m_dataValid = false;
});
@@ -61,7 +61,7 @@ namespace hex::plugin::builtin {
ViewInformation::~ViewInformation() {
EventManager::unsubscribe<EventDataChanged>(this);
EventManager::unsubscribe<EventRegionSelected>(this);
EventManager::unsubscribe<EventFileUnloaded>(this);
EventManager::unsubscribe<EventProviderDeleted>(this);
}
static float calculateEntropy(std::array<ImU64, 256> &valueCounts, size_t blockSize) {