Tables: fixed auto-width columns when using synced-instances of same table. (#7218)

Amend d3c3514a5
This commit is contained in:
ocornut
2024-09-17 20:34:54 +02:00
parent 6aade6912a
commit e648dbb59d
2 changed files with 3 additions and 1 deletions

View File

@@ -866,7 +866,7 @@ void ImGui::TableUpdateLayout(ImGuiTable* table)
// Calculate ideal/auto column width (that's the width required for all contents to be visible without clipping)
// Combine width from regular rows + width from headers unless requested not to.
if (!column->IsPreserveWidthAuto)
if (!column->IsPreserveWidthAuto && table->InstanceCurrent == 0)
column->WidthAuto = TableGetColumnWidthAuto(table, column);
// Non-resizable columns keep their requested width (apply user value regardless of IsPreserveWidthAuto)