mirror of
https://github.com/wolfpld/tracy.git
synced 2026-09-01 16:08:30 +00:00
The imgui 1.92.9b ini writer omits 'Column N' lines for columns without saved data (e.g. the unsized, unsorted 'Zone' column of the child zones table, which only persists the default Time sort). On restore, the missing entry keeps Index == -1, the sequential fallback in TableLoadSettingsForColumns() assigns it to the remaining column, and TableFixDisplayOrder() sorts DisplayOrder -1 to the end - flipping the column order (Time | Zone in the zone info child list) for the session. Guard the non-reorderable load path against phantom entries. Upstream: https://github.com/ocornut/imgui/issues/9519
15 lines
877 B
Diff
15 lines
877 B
Diff
diff --git a/imgui_tables.cpp b/imgui_tables.cpp
|
|
--- a/imgui_tables.cpp
|
|
+++ b/imgui_tables.cpp
|
|
@@ -4082,7 +4082,9 @@
|
|
}
|
|
if (load_flags & ImGuiTableFlags_Reorderable)
|
|
column->DisplayOrder = column_settings->DisplayOrder;
|
|
- else
|
|
+ else if (column_settings->Index != -1)
|
|
+ // An Index of -1 means this column had no "Column N" line in the .ini file (columns without saved
|
|
+ // data are not written). Keep the display order as initialized (identity for non-reorderable tables). (#9519)
|
|
column->DisplayOrder = column_settings->Index; // Because default depends on previous Index, we need to set that up and cannot rely on TableInitColumnDefaults()
|
|
if ((load_flags & ImGuiTableFlags_Hideable) && column_settings->IsEnabled != -1)
|
|
column->IsUserEnabled = column->IsUserEnabledNextFrame = (column_settings->IsEnabled == 1);
|