Skip to content

Fix non-reorderable table display order after topology changes - #9572

Closed
Anujgiri1279 wants to merge 3 commits into
ocornut:masterfrom
Anujgiri1279:master
Closed

Anujgiri1279 wants to merge 3 commits into
ocornut:masterfrom
Anujgiri1279:master

Conversation

@Anujgiri1279

@Anujgiri1279 Anujgiri1279 commented Oct 3, 2026 •

Copy link
Copy Markdown

#9570
Non-reorderable tables could display columns in the wrong order after columns were inserted or appended. Stale or duplicate DisplayOrder values from table reconciliation and settings loading were being sorted even though non-reorderable tables should always follow declaration order.

Changes

  • Reset DisplayOrder to the column index for non-reorderable tables.
  • Rebuild DisplayOrderToIndex to match that order.
  • Preserve the existing sorting and compaction behavior for reorderable tables.

The change is limited to imgui_tables.cpp, inside ImGui::TableFixDisplayOrder().

Validation

  • Built examples/example_null successfully.
  • Ran example_null successfully through 20 frames.
  • Built with WITH_EXTRA_WARNINGS=1 successfully.
  • CodeQL reported 0 alerts.
  • Secret scan found no secrets.

Copilot AI and others added 3 commits October 3, 2026 19:29
Co-authored-by: Anujgiri1279 <122677344+Anujgiri1279@users.noreply.github.com>
…ble-display-order

Tables: reset non-reorderable display order in `TableFixDisplayOrder()`
@ocornut

ocornut commented Oct 4, 2026

Copy link
Copy Markdown
Owner

Hello,

Thanks for your PR.

The dedicated Dear ImGui test engine was not included in this repository, so a focused imgui_test_suite regression test could not be run here.

The fix may or not be wrong, I don't know yet. But that's not an acceptable statement. Don't let Copilot state stupid things and submit that as PR. Use common sense.

@Anujgiri1279

Anujgiri1279 commented Oct 5, 2026 •

Copy link
Copy Markdown
Author

The fix may or not be wrong, I don't know yet. But that's not an acceptable statement. Don't let Copilot state stupid things and submit that as PR. Use common sense.

Yeah , Okay Understood

ocornut added a commit that referenced this pull request Oct 5, 2026
@ocornut

ocornut commented Oct 5, 2026

Copy link
Copy Markdown
Owner

Fixed by 68bd43b (#9570)

@ocornut ocornut closed this Oct 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants