1
0
mirror of synced 2024-09-24 19:48:25 +02:00

lang: Fix color attribute not being applied to array entries

This commit is contained in:
WerWolv 2021-03-02 14:23:06 +01:00
parent c84ac0bc10
commit b6939654b3

View File

@ -450,7 +450,11 @@ namespace hex::lang {
class PatternDataArray : public PatternData {
public:
PatternDataArray(u64 offset, size_t size, std::vector<PatternData*> 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)