mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-03-28 07:47:03 -05:00
fix: Hidden patterns getting used for pattern parent highlighting
(cherry picked from commit 5ecf122686)
This commit is contained in:
@@ -2263,10 +2263,15 @@ namespace hex::plugin::builtin {
|
||||
|
||||
const auto hoveredRegion = Region { address, size };
|
||||
for (const auto &pattern : runtime.getPatternsAtAddress(hoveredRegion.getStartAddress())) {
|
||||
if (pattern->getVisibility() == pl::ptrn::Visibility::Hidden || pattern->getVisibility() == pl::ptrn::Visibility::HighlightHidden)
|
||||
continue;
|
||||
const pl::ptrn::Pattern * checkPattern = pattern;
|
||||
if (auto parent = checkPattern->getParent(); parent != nullptr)
|
||||
checkPattern = parent;
|
||||
|
||||
if (checkPattern->getVisibility() == pl::ptrn::Visibility::Hidden || checkPattern->getVisibility() == pl::ptrn::Visibility::HighlightHidden)
|
||||
continue;
|
||||
|
||||
result.emplace(checkPattern->getOffset(), checkPattern->getSize());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user