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 bug where pattern header was sometimes not redrawn #404

Merged
merged 1 commit into from
Aug 19, 2021

Conversation

nyanpasu64
Copy link
Contributor

In 0.5.0 and before, pressing Shift+Tab repeatedly until you reach FM 2 will fail to redraw the header, because oldLeftTrackIdx was erroneously declared a bool.

In builds since accb5ac (accb5ac#diff-97d96a2c599e40b88ae7e016d1b61a16bbb5cb81d4ef24f08c83fa5e8f2307fb) (more recent than 0.5.0), placing the cursor in the leftmost column, then pressing Shift+Tab to jump to the right an even number of columns, will fail to redraw the header, and 1 of every 2 subsequent Shift+Tab presses will fail to redraw. This is due to the bizarre static_cast<bool>(leftTrackVisIdx_&1) != oldLeftTrackIdx comparison.

This fixes both problems by declaring oldLeftTrackIdx as an int, and comparing it to leftTrackVisIdx_ directly.

@OPNA2608 OPNA2608 merged commit 4357a36 into BambooTracker:master Aug 19, 2021
@nyanpasu64
Copy link
Contributor Author

not waiting for CI to pass is... brave.

@OPNA2608
Copy link
Member

Yes.

@nyanpasu64 nyanpasu64 deleted the fix-header-redraw branch August 22, 2021 16:29
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.

None yet

2 participants