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

@@ -37,7 +37,7 @@ namespace hex::plugin::builtin {
ProjectFile::setBookmarks(this->m_bookmarks);
});
EventManager::subscribe<EventFileUnloaded>(this, [this] {
EventManager::subscribe<EventProviderDeleted>(this, [this](const auto*) {
this->m_bookmarks.clear();
});
@@ -115,7 +115,7 @@ namespace hex::plugin::builtin {
EventManager::unsubscribe<RequestAddBookmark>(this);
EventManager::unsubscribe<EventProjectFileLoad>(this);
EventManager::unsubscribe<EventProjectFileStore>(this);
EventManager::unsubscribe<EventFileUnloaded>(this);
EventManager::unsubscribe<EventProviderDeleted>(this);
this->m_bookmarks.clear();
}