Skip to content

Commit

Permalink
fix: tree node not honoring default open inside hidden column #1878
Browse files Browse the repository at this point in the history
  • Loading branch information
hoffstadt committed Oct 17, 2022
1 parent c6dc126 commit e9548a4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/mvTables.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,10 @@ void mvTable::draw(ImDrawList* drawlist, float x, float y)
if (_cellColorsSet[row_index][column_index])
ImGui::TableSetBgColor(ImGuiTableBgTarget_CellBg, _cellColors[row_index][column_index]);

cell->draw(drawlist, ImGui::GetCursorPosX(), ImGui::GetCursorPosY());
auto& columnItem = childslots[0][column_index];

if(columnItem->config.enabled)
cell->draw(drawlist, ImGui::GetCursorPosX(), ImGui::GetCursorPosY());
}
};

Expand Down Expand Up @@ -340,6 +343,7 @@ void mvTable::draw(ImDrawList* drawlist, float x, float y)
item->state.lastFrameUpdate = GContext->frame;
item->state.visible = flags & ImGuiTableColumnFlags_IsVisible;
item->state.hovered = flags & ImGuiTableColumnFlags_IsHovered;
if(!item->config.enabled && item->state.visible) item->config.enabled = true;
columnnum++;
}

Expand Down

0 comments on commit e9548a4

Please # to comment.