mirror of
https://github.com/Drezil/imgui.git
synced 2024-11-14 17:07:01 +00:00
Tables: Fix for hiding first column (fix fcceff5c + reading PrevLineTextBaseOffset in EndCell of inactive column).
This commit is contained in:
parent
164caa2db7
commit
31de161066
@ -1449,6 +1449,7 @@ void ImGui::TableBeginRow(ImGuiTable* table)
|
||||
|
||||
table->RowPosY1 = table->RowPosY2 = next_y1;
|
||||
table->RowTextBaseline = 0.0f;
|
||||
window->DC.PrevLineTextBaseOffset = 0.0f;
|
||||
window->DC.CursorMaxPos.y = next_y1;
|
||||
|
||||
// Making the header BG color non-transparent will allow us to overlay it multiple times when handling smooth dragging.
|
||||
@ -1569,6 +1570,7 @@ void ImGui::TableEndRow(ImGuiTable* table)
|
||||
|
||||
// [Internal] Called by TableNextRow()TableNextCell()!
|
||||
// This is called a lot, so we need to be mindful of unnecessary overhead.
|
||||
// FIXME-TABLE FIXME-OPT: Could probably shortcut some things for non-active or clipped columns.
|
||||
void ImGui::TableBeginCell(ImGuiTable* table, int column_no)
|
||||
{
|
||||
table->CurrentColumn = column_no;
|
||||
@ -1839,7 +1841,7 @@ void ImGui::TableAutoHeaders()
|
||||
|
||||
// Open row
|
||||
TableNextRow(ImGuiTableRowFlags_Headers, row_height);
|
||||
if (window->SkipItems)
|
||||
if (table->HostSkipItems) // Merely an optimization
|
||||
return;
|
||||
|
||||
// This for loop is constructed to not make use of internal functions,
|
||||
@ -1879,8 +1881,7 @@ void ImGui::TableAutoHeaders()
|
||||
open_context_popup = column_n;
|
||||
}
|
||||
|
||||
// FIXME-TABLE: This is not user-land code any more...
|
||||
// FIXME-TABLE: Need to explain why this is here!
|
||||
// FIXME-TABLE: This is not user-land code any more + need to explain WHY this is here!
|
||||
window->SkipItems = table->HostSkipItems;
|
||||
|
||||
// Allow opening popup from the right-most section after the last column
|
||||
|
Loading…
Reference in New Issue
Block a user