1
0
mirror of synced 2025-01-18 17:14:13 +01:00

patterns: Don't re-evaluate format functions during highlighting

This commit is contained in:
WerWolv 2023-07-01 14:06:15 +02:00
parent c6c3ca4d26
commit a0c89858ed
2 changed files with 4 additions and 7 deletions

@ -1 +1 @@
Subproject commit 72ab71a9166063f4688bc87d55be08ead4f0c1d7
Subproject commit 85dac566096528099ae956a49a7ccfe7de1d3f97

View File

@ -1179,14 +1179,11 @@ namespace hex::plugin::builtin {
std::optional<ImColor> color;
if (TRY_LOCK(ContentRegistry::PatternLanguage::getRuntimeLock())) {
for (const auto &pattern : runtime.getPatternsAtAddress(address)) {
if (pattern->getVisibility() != pl::ptrn::Visibility::Visible)
continue;
for (const auto &patternColor : runtime.getColorsAtAddress(address)) {
if (color.has_value())
color = ImAlphaBlendColors(*color, pattern->getColor());
color = ImAlphaBlendColors(*color, patternColor);
else
color = pattern->getColor();
color = patternColor;
}
}