patterns: Fixed static arrays showing same value for all entries
This commit is contained in:
parent
2d87d29fa0
commit
a17b647e79
@ -240,6 +240,10 @@ namespace hex::pl {
|
||||
return this->m_cachedDisplayValue.value();
|
||||
}
|
||||
|
||||
void clearFormatCache() {
|
||||
this->m_cachedDisplayValue.reset();
|
||||
}
|
||||
|
||||
protected:
|
||||
void createDefaultEntry(const std::string &value, Token::Literal &&literal) const {
|
||||
ImGui::TableNextRow();
|
||||
|
@ -55,6 +55,7 @@ namespace hex::pl {
|
||||
if (open) {
|
||||
auto entry = this->m_template->clone();
|
||||
for (u64 index = 0; index < this->m_entryCount; index++) {
|
||||
entry->clearFormatCache();
|
||||
entry->setVariableName(hex::format("[{0}]", index));
|
||||
entry->setOffset(this->getOffset() + index * this->m_template->getSize());
|
||||
entry->draw(provider);
|
||||
|
Loading…
x
Reference in New Issue
Block a user