From b6939654b361edb9a7d9b0e61ffe2a51de8fd338 Mon Sep 17 00:00:00 2001 From: WerWolv Date: Tue, 2 Mar 2021 14:23:06 +0100 Subject: [PATCH] lang: Fix color attribute not being applied to array entries --- plugins/libimhex/include/hex/lang/pattern_data.hpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugins/libimhex/include/hex/lang/pattern_data.hpp b/plugins/libimhex/include/hex/lang/pattern_data.hpp index fb0ffbea1..88b6b162d 100644 --- a/plugins/libimhex/include/hex/lang/pattern_data.hpp +++ b/plugins/libimhex/include/hex/lang/pattern_data.hpp @@ -450,7 +450,11 @@ namespace hex::lang { class PatternDataArray : public PatternData { public: PatternDataArray(u64 offset, size_t size, std::vector entries, u32 color = 0) - : PatternData(offset, size, color), m_entries(std::move(entries)) { } + : PatternData(offset, size, color), m_entries(std::move(entries)) { + + for (auto &entry : entries) + entry->setColor(color); + } PatternDataArray(const PatternDataArray &other) : PatternData(other.getOffset(), other.getSize(), other.getColor()) { for (const auto &entry : other.m_entries)