fix: Hidden attribute not applying to top-level patterns

This commit is contained in:
WerWolv 2022-10-12 14:49:48 +02:00
parent 72ee1d186e
commit e3f88395ec
2 changed files with 5 additions and 4 deletions

View File

@ -10,6 +10,8 @@ namespace hex {
public:
PatternDrawer() = default;
void draw(pl::ptrn::Pattern& pattern);
void visit(pl::ptrn::PatternArrayDynamic& pattern) override;
void visit(pl::ptrn::PatternArrayStatic& pattern) override;
void visit(pl::ptrn::PatternBitfieldField& pattern) override;
@ -29,8 +31,6 @@ namespace hex {
void visit(pl::ptrn::PatternWideString& pattern) override;
private:
void draw(pl::ptrn::Pattern& pattern);
constexpr static auto ChunkSize = 512;
constexpr static auto DisplayEndStep = 64;

View File

@ -124,8 +124,9 @@ namespace hex::plugin::builtin {
ImGui::TableHeadersRow();
if (!sortedPatterns.empty()) {
for (auto &pattern : sortedPatterns)
pattern->accept(this->m_patternDrawer);
for (auto &pattern : sortedPatterns) {
this->m_patternDrawer.draw(*pattern);
}
}
ImGui::EndTable();