1
0
mirror of synced 2025-01-19 01:24:15 +01:00

fix: Edit menu items being always unavailable

This commit is contained in:
WerWolv 2022-11-09 18:49:07 +01:00
parent 4c5d2f6ebb
commit 9074a6fcf1
2 changed files with 5 additions and 1 deletions

View File

@ -83,7 +83,7 @@ namespace hex {
std::map<u32, Tooltip> &getTooltips();
std::map<u32, TooltipFunction> &getTooltipFunctions();
void setCurrentSelection(ProviderRegion region);
void setCurrentSelection(std::optional<ProviderRegion> region);
}
u32 addBackgroundHighlight(const Region &region, color_t color);

View File

@ -123,6 +123,10 @@ namespace hex::plugin::builtin {
ProviderExtraData::erase(provider);
});
EventManager::subscribe<EventRegionSelected>([](const ImHexApi::HexEditor::ProviderRegion &region) {
ImHexApi::HexEditor::impl::setCurrentSelection(region);
});
fs::setFileBrowserErrorCallback([]{
#if defined(NFD_PORTAL)
View::showErrorPopup("hex.builtin.popup.error.file_dialog.portal"_lang);