fix: Edit menu items being always unavailable
This commit is contained in:
parent
4c5d2f6ebb
commit
9074a6fcf1
@ -83,7 +83,7 @@ namespace hex {
|
|||||||
std::map<u32, Tooltip> &getTooltips();
|
std::map<u32, Tooltip> &getTooltips();
|
||||||
std::map<u32, TooltipFunction> &getTooltipFunctions();
|
std::map<u32, TooltipFunction> &getTooltipFunctions();
|
||||||
|
|
||||||
void setCurrentSelection(ProviderRegion region);
|
void setCurrentSelection(std::optional<ProviderRegion> region);
|
||||||
}
|
}
|
||||||
|
|
||||||
u32 addBackgroundHighlight(const Region ®ion, color_t color);
|
u32 addBackgroundHighlight(const Region ®ion, color_t color);
|
||||||
|
@ -123,6 +123,10 @@ namespace hex::plugin::builtin {
|
|||||||
ProviderExtraData::erase(provider);
|
ProviderExtraData::erase(provider);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
EventManager::subscribe<EventRegionSelected>([](const ImHexApi::HexEditor::ProviderRegion ®ion) {
|
||||||
|
ImHexApi::HexEditor::impl::setCurrentSelection(region);
|
||||||
|
});
|
||||||
|
|
||||||
fs::setFileBrowserErrorCallback([]{
|
fs::setFileBrowserErrorCallback([]{
|
||||||
#if defined(NFD_PORTAL)
|
#if defined(NFD_PORTAL)
|
||||||
View::showErrorPopup("hex.builtin.popup.error.file_dialog.portal"_lang);
|
View::showErrorPopup("hex.builtin.popup.error.file_dialog.portal"_lang);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user