fix: Template pattern types being placeable using right click menu
This commit is contained in:
parent
45bb9e6706
commit
e529a79ddb
2
lib/external/pattern_language
vendored
2
lib/external/pattern_language
vendored
@ -1 +1 @@
|
||||
Subproject commit 4dec3adf6e2a8369569d64a6fe2c46b7c09f5943
|
||||
Subproject commit b5694bea25f0a947ba5d39eacda2109482cfcf62
|
@ -928,7 +928,8 @@ namespace hex::plugin::builtin {
|
||||
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) {
|
||||
if (type->isTemplateType())
|
||||
continue;
|
||||
|
Loading…
Reference in New Issue
Block a user