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 sorting getting corrupted #211

Merged
merged 1 commit into from
Dec 23, 2024
Merged

Fix sorting getting corrupted #211

merged 1 commit into from
Dec 23, 2024

Conversation

Willy-JL
Copy link
Owner

https://github.com/ocornut/imgui/issues/4233
bug in imgui, sorts can return corrupted data when specs_dirty is false
fixed in imgui 1.84, pyimgui is imgui 1.82

here we were always checking sort specs as different tabs can have different table ids, but switching them dont count as specs_dirty
thus always checking the actual specs allowed to sort again when changing tabs

now instead we save the specs of all such tables when its specs_dirty is true
means no checking specs without specs_dirty, avoiding the imgui bug
but can still use correct sorting when changing tab as we save different sorts for different table ids

thanks FaceCrap for finding that imgui issue thread!

ocornut/imgui#4233
bug in imgui, sorts can return corrupted data when specs_dirty is false
fixed in imgui 1.84, pyimgui is imgui 1.82

here we were always checking sort specs as different tabs can have different table ids, but switching them dont count as specs_dirty
thus alway checking the actual specs allowed to sort again when changing tabs

now instead we save the specs all such tables when its specs_dirty is true
means no checking specs without specs_dirty, avoiding the imgui bug
but can still use correct sorting when changing tab as we save different sorts for different table ids

thanks FaceCrap for finding that imgui issue thread!
@Willy-JL Willy-JL self-assigned this Dec 20, 2024
@Willy-JL Willy-JL added the bugfix Something isn't working label Dec 20, 2024
@Willy-JL Willy-JL marked this pull request as ready for review December 23, 2024 12:46
@Willy-JL Willy-JL merged commit 2bcfe9f into main Dec 23, 2024
8 checks passed
@Willy-JL Willy-JL deleted the fix/corrupted-sorting branch December 23, 2024 12:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix Something isn't working
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

1 participant