Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typo in TableGetSortSpecs comment (cpp) #6755

Merged
merged 1 commit into from
Aug 28, 2023
Merged

Conversation

dimateos
Copy link
Contributor

I ended up in imgui_tables.cpp looking at the implementation for TableGetSortSpecs() and the description is a bit outdated. SpecsChanged is not longer part of the internal (nor external) API.

  • Replaced it with an up to date piece from imgui.h

    imgui/imgui.h

    Lines 775 to 779 in 82d177c

    // Tables: Sorting & Miscellaneous functions
    // - Sorting: call TableGetSortSpecs() to retrieve latest sort specs for the table. NULL when not sorting.
    // When 'sort_specs->SpecsDirty == true' you should sort your data. It will be true when sorting specs have
    // changed since last call, or the first time. Make sure to set 'SpecsDirty = false' after sorting,
    // else you may wastefully sort your data every frame!
    • Correct SpecsChanged -> sort_specs->SpecsDirty
    • Kept the tip about making sure to set 'SpecsDirty = false'

Feel free to edit etc...
Thanks Omar!

@ocornut ocornut merged commit d6e9fad into ocornut:master Aug 28, 2023
@dimateos dimateos deleted the patch-1 branch October 24, 2024 17:48
@dimateos dimateos restored the patch-1 branch October 24, 2024 17:48
@dimateos dimateos deleted the patch-1 branch October 24, 2024 18:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants