mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-11 00:04:24 +00:00
Obsoleted using SetCursorPos()/SetCursorScreenPos() to extend parent window/cell boundaries. (#5548)
This incorrect pattern has been mentioned or suggested in: #4510, #3355, #1760, #1490, #4152, #150
This commit is contained in:
parent
5867a43dc8
commit
edcd5b113e
5 changed files with 78 additions and 8 deletions
|
|
@ -1718,7 +1718,7 @@ void ImGui::TableBeginRow(ImGuiTable* table)
|
|||
table->RowIndentOffsetX = window->DC.Indent.x - table->HostIndentX; // Lock indent
|
||||
window->DC.PrevLineTextBaseOffset = 0.0f;
|
||||
window->DC.CurrLineSize = ImVec2(0.0f, 0.0f);
|
||||
window->DC.IsSameLine = false;
|
||||
window->DC.IsSameLine = window->DC.IsSetPos = false;
|
||||
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.
|
||||
|
|
@ -2000,6 +2000,9 @@ void ImGui::TableEndCell(ImGuiTable* table)
|
|||
ImGuiTableColumn* column = &table->Columns[table->CurrentColumn];
|
||||
ImGuiWindow* window = table->InnerWindow;
|
||||
|
||||
if (window->DC.IsSetPos)
|
||||
ErrorCheckUsingSetCursorPosToExtendParentBoundaries();
|
||||
|
||||
// Report maximum position so we can infer content size per column.
|
||||
float* p_max_pos_x;
|
||||
if (table->RowFlags & ImGuiTableRowFlags_Headers)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue