mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-04-03 05:57:40 -05:00
refactor: Better interface for the event system
This commit is contained in:
@@ -49,7 +49,7 @@ namespace hex::plugin::builtin {
|
||||
};
|
||||
|
||||
ViewHashes::ViewHashes() : View::Window("hex.builtin.view.hashes.name") {
|
||||
EventManager::subscribe<EventRegionSelected>(this, [this](const auto &providerRegion) {
|
||||
EventRegionSelected::subscribe(this, [this](const auto &providerRegion) {
|
||||
for (auto &function : this->m_hashFunctions.get(providerRegion.getProvider()))
|
||||
function.reset();
|
||||
});
|
||||
@@ -124,7 +124,7 @@ namespace hex::plugin::builtin {
|
||||
}
|
||||
|
||||
ViewHashes::~ViewHashes() {
|
||||
EventManager::unsubscribe<EventRegionSelected>(this);
|
||||
EventRegionSelected::unsubscribe(this);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user