mirror of
https://github.com/ocornut/imgui.git
synced 2026-06-21 22:06:31 +00:00
Tables: allow calling TableQueueSetColumnDisplayOrder() between TableSetupColumn() and TableUpdateLayout() by removing an early out.
As `table->Columns[column_n].DisplayOrder` is not viable in this scope during a reconcile.
This commit is contained in:
@@ -775,8 +775,9 @@ void ImGui::TableQueueSetColumnDisplayOrder(ImGuiTable* table, int column_n, int
|
||||
table->ReorderColumn = (ImGuiTableColumnIdx)column_n;
|
||||
table->ReorderColumnDstOrder = (ImGuiTableColumnIdx)-1;
|
||||
dst_order = TableGetMaxDisplayOrderAllowed(table, src_order, dst_order);
|
||||
if (dst_order != src_order)
|
||||
table->ReorderColumnDstOrder = (ImGuiTableColumnIdx)dst_order;
|
||||
if (table->IsLayoutLocked && dst_order == src_order) // We allow calling the function before layout w/ reconcile so don't early out.
|
||||
return;
|
||||
table->ReorderColumnDstOrder = (ImGuiTableColumnIdx)dst_order;
|
||||
}
|
||||
|
||||
// Adjust flags: default width mode + stretch columns are not allowed when auto extending
|
||||
|
||||
Reference in New Issue
Block a user