Fixed pattern data view not rendering at all

This commit is contained in:
WerWolv 2020-11-19 21:59:27 +01:00
parent ed9922c8a9
commit 89afbd1aef
1 changed files with 11 additions and 7 deletions

View File

@ -41,8 +41,6 @@ namespace hex {
sortSpecs->SpecsDirty = false;
}
ImGui::TableHeadersRow();
return true;
}
@ -59,13 +57,19 @@ namespace hex {
if (this->m_dataProvider != nullptr && this->m_dataProvider->isReadable()) {
if (beginPatternDataTable(this->m_dataProvider, this->m_patternData, this->m_sortedPatternData)) {
if (this->m_sortedPatternData.size() > 0) {
ImGui::TableHeadersRow();
u32 rowCount = 0;
for (auto &patternData : this->m_sortedPatternData) {
patternData->createEntry(this->m_dataProvider);
ImGui::TableSetBgColor(ImGuiTableBgTarget_RowBg0, ((rowCount % 2) == 0) ? 0xFF101010 : 0xFF303030);
ImGui::TableSetBgColor(ImGuiTableBgTarget_RowBg0,
((rowCount % 2) == 0) ? 0xFF101010 : 0xFF303030);
rowCount++;
}
}
ImGui::EndTable();
}