1
0
mirror of synced 2024-11-25 08:10:24 +01:00

fix: Template pattern types being placeable using right click menu

This commit is contained in:
WerWolv 2023-01-04 15:50:37 +01:00
parent 45bb9e6706
commit e529a79ddb
2 changed files with 3 additions and 2 deletions

@ -1 +1 @@
Subproject commit 4dec3adf6e2a8369569d64a6fe2c46b7c09f5943 Subproject commit b5694bea25f0a947ba5d39eacda2109482cfcf62

View File

@ -928,7 +928,8 @@ namespace hex::plugin::builtin {
ImGui::EndMenu(); ImGui::EndMenu();
} }
if (ImGui::BeginMenu("hex.builtin.view.pattern_editor.menu.edit.place_pattern.custom"_lang, !types.empty())) { bool hasPlaceableTypes = std::any_of(types.begin(), types.end(), [](const auto &type) { return !type.second->isTemplateType(); });
if (ImGui::BeginMenu("hex.builtin.view.pattern_editor.menu.edit.place_pattern.custom"_lang, hasPlaceableTypes)) {
for (const auto &[typeName, type] : types) { for (const auto &[typeName, type] : types) {
if (type->isTemplateType()) if (type->isTemplateType())
continue; continue;