fix: Copy-as options not being disabled correctly

This commit is contained in:
WerWolv
2023-05-12 08:38:07 +02:00
parent 0321743f1e
commit 18bc5de169
3 changed files with 11 additions and 1 deletions

View File

@@ -1043,8 +1043,9 @@ namespace hex::plugin::builtin {
auto selection = ImHexApi::HexEditor::getSelection();
auto provider = ImHexApi::Provider::get();
bool enabled = ImHexApi::HexEditor::isSelectionValid();
for (const auto &[unlocalizedName, callback] : ContentRegistry::DataFormatter::impl::getEntries()) {
if (ImGui::MenuItem(LangEntry(unlocalizedName))) {
if (ImGui::MenuItem(LangEntry(unlocalizedName), nullptr, false, enabled)) {
ImGui::SetClipboardText(
callback(
provider,