pattern: Fixed color overriding of struct members when struct has a color set already
Fixes #409
This commit is contained in:
parent
362413dbe7
commit
bfa3538745
@ -1145,9 +1145,11 @@ namespace hex::pl {
|
|||||||
|
|
||||||
void setColor(u32 color) override {
|
void setColor(u32 color) override {
|
||||||
PatternData::setColor(color);
|
PatternData::setColor(color);
|
||||||
for (auto &member : this->m_members)
|
for (auto &member : this->m_members) {
|
||||||
|
if (!member->hasOverriddenColor())
|
||||||
member->setColor(color);
|
member->setColor(color);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void sort(ImGuiTableSortSpecs *sortSpecs, prv::Provider *provider) override {
|
void sort(ImGuiTableSortSpecs *sortSpecs, prv::Provider *provider) override {
|
||||||
this->m_sortedMembers = this->m_members;
|
this->m_sortedMembers = this->m_members;
|
||||||
@ -1291,9 +1293,11 @@ namespace hex::pl {
|
|||||||
|
|
||||||
void setColor(u32 color) override {
|
void setColor(u32 color) override {
|
||||||
PatternData::setColor(color);
|
PatternData::setColor(color);
|
||||||
for (auto &member : this->m_members)
|
for (auto &member : this->m_members) {
|
||||||
|
if (!member->hasOverriddenColor())
|
||||||
member->setColor(color);
|
member->setColor(color);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void sort(ImGuiTableSortSpecs *sortSpecs, prv::Provider *provider) override {
|
void sort(ImGuiTableSortSpecs *sortSpecs, prv::Provider *provider) override {
|
||||||
this->m_sortedMembers = this->m_members;
|
this->m_sortedMembers = this->m_members;
|
||||||
|
@ -880,7 +880,7 @@ namespace hex::pl {
|
|||||||
if (!isFunction) {
|
if (!isFunction) {
|
||||||
auto type = parseType();
|
auto type = parseType();
|
||||||
|
|
||||||
if (MATCHES(sequence(IDENTIFIER, SEPARATOR_SQUAREBRACKETOPEN)) && sequence<Not>(SEPARATOR_SQUAREBRACKETOPEN))
|
if (MATCHES(sequence(IDENTIFIER, SEPARATOR_SQUAREBRACKETOPEN) && sequence<Not>(SEPARATOR_SQUAREBRACKETOPEN)))
|
||||||
member = parseMemberArrayVariable(type);
|
member = parseMemberArrayVariable(type);
|
||||||
else if (MATCHES(sequence(IDENTIFIER)))
|
else if (MATCHES(sequence(IDENTIFIER)))
|
||||||
member = parseMemberVariable(type);
|
member = parseMemberVariable(type);
|
||||||
|
Loading…
Reference in New Issue
Block a user