diff --git a/lib/external/pattern_language b/lib/external/pattern_language index f9eed4b7a..9a02bd862 160000 --- a/lib/external/pattern_language +++ b/lib/external/pattern_language @@ -1 +1 @@ -Subproject commit f9eed4b7ad1f6f50f25f9fd4222be325885e8c4e +Subproject commit 9a02bd862fc8a4768a152a31a0175145fc48b0a2 diff --git a/plugins/ui/source/ui/pattern_drawer.cpp b/plugins/ui/source/ui/pattern_drawer.cpp index d3e2a2be8..06a10de12 100644 --- a/plugins/ui/source/ui/pattern_drawer.cpp +++ b/plugins/ui/source/ui/pattern_drawer.cpp @@ -1392,15 +1392,17 @@ namespace hex::ui { m_favoritesUpdateTask = TaskManager::createTask("hex.ui.pattern_drawer.updating"_lang, TaskManager::NoProgress, [this, patterns](auto &task) { size_t updatedFavorites = 0; + const std::string favoriteAttribute = "hex::favorite"; + const std::string groupAttribute = "hex::group"; for (auto &pattern : patterns) { std::vector patternPath; size_t startFavoriteCount = m_favorites.size(); traversePatternTree(*pattern, patternPath, [&, this](const pl::ptrn::Pattern &currPattern) { - if (currPattern.hasAttribute("hex::favorite")) + if (currPattern.hasAttribute(favoriteAttribute)) m_favorites.insert({ patternPath, currPattern.clone() }); - if (const auto &args = currPattern.getAttributeArguments("hex::group"); !args.empty()) { + if (const auto &args = currPattern.getAttributeArguments(groupAttribute); !args.empty()) { auto groupName = args.front().toString(); if (!m_groups.contains(groupName))