You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tables: Fixed incorrect border height used for logic when resizing one of several synchronized instance of a same table ID, when instances have a different height. (ocornut#3955, ocornut#3565)
Copy file name to clipboardExpand all lines: imgui_internal.h
+13-2
Original file line number
Diff line number
Diff line change
@@ -136,6 +136,7 @@ struct ImGuiTabBar; // Storage for a tab bar
136
136
structImGuiTabItem; // Storage for a tab item (within a tab bar)
137
137
structImGuiTable; // Storage for a table
138
138
structImGuiTableColumn; // Storage for one column of a table
139
+
structImGuiTableInstanceData; // Storage for one instance of a same table
139
140
structImGuiTableTempData; // Temporary storage for one table (one per table in the stack), shared between tables.
140
141
structImGuiTableSettings; // Storage for a table .ini settings
141
142
structImGuiTableColumnsSettings; // Storage for a column .ini settings
@@ -2290,6 +2291,15 @@ struct ImGuiTableCellData
2290
2291
ImGuiTableColumnIdx Column; // Column number
2291
2292
};
2292
2293
2294
+
// Per-instance data that needs preserving across frames (seemingly most others do not need to be preserved aside from debug needs, does that needs they could be moved to ImGuiTableTempData ?)
2295
+
structImGuiTableInstanceData
2296
+
{
2297
+
float LastOuterHeight; // Outer height from last frame // FIXME: multi-instance issue (#3955)
2298
+
float LastFirstRowHeight; // Height of first row from last frame // FIXME: possible multi-instance issue?
// FIXME-TABLE: more transient data could be stored in a per-stacked table structure: DrawSplitter, SortSpecs, incoming RowData
2294
2304
structIMGUI_API ImGuiTable
2295
2305
{
@@ -2332,8 +2342,6 @@ struct IMGUI_API ImGuiTable
2332
2342
float CellPaddingY;
2333
2343
float CellSpacingX1; // Spacing between non-bordered cells
2334
2344
float CellSpacingX2;
2335
-
float LastOuterHeight; // Outer height from last frame
2336
-
float LastFirstRowHeight; // Height of first row from last frame
2337
2345
float InnerWidth; // User value passed to BeginTable(), see comments at the top of BeginTable() for details.
2338
2346
float ColumnsGivenWidth; // Sum of current column width
2339
2347
float ColumnsAutoFitWidth; // Sum of ideal column width in order nothing to be clipped, used for auto-fitting and content width submission in outer window
@@ -2353,6 +2361,8 @@ struct IMGUI_API ImGuiTable
2353
2361
ImGuiWindow* InnerWindow; // Window holding the table data (== OuterWindow or a child window)
ImDrawListSplitter* DrawSplitter; // Shortcut to TempData->DrawSplitter while in table. Isolate draw commands per columns to avoid switching clip rect constantly
2364
+
ImGuiTableInstanceData InstanceDataFirst;
2365
+
ImVector<ImGuiTableInstanceData> InstanceDataExtra; // FIXME-OPT: Using a small-vector pattern would be good.
2356
2366
ImGuiTableColumnSortSpecs SortSpecsSingle;
2357
2367
ImVector<ImGuiTableColumnSortSpecs> SortSpecsMulti; // FIXME-OPT: Using a small-vector pattern would be good.
2358
2368
ImGuiTableSortSpecs SortSpecs; // Public facing sorts specs, this is what we return in TableGetSortSpecs()
0 commit comments