mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-03-30 05:05:19 -05:00
fix: Edit menu items being always unavailable
This commit is contained in:
@@ -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 ®ion, color_t color);
|
||||
|
||||
@@ -123,6 +123,10 @@ namespace hex::plugin::builtin {
|
||||
ProviderExtraData::erase(provider);
|
||||
});
|
||||
|
||||
EventManager::subscribe<EventRegionSelected>([](const ImHexApi::HexEditor::ProviderRegion ®ion) {
|
||||
ImHexApi::HexEditor::impl::setCurrentSelection(region);
|
||||
});
|
||||
|
||||
fs::setFileBrowserErrorCallback([]{
|
||||
#if defined(NFD_PORTAL)
|
||||
View::showErrorPopup("hex.builtin.popup.error.file_dialog.portal"_lang);
|
||||
|
||||
Reference in New Issue
Block a user