Skip to content

Fix UI freeze when zooming in on long samples - #7253

Merged
zonkmachine merged 2 commits into
LMMS:masterfrom
khoidauminh:fix-sample-zoom-freeze
May 19, 2024
Merged

zonkmachine merged 2 commits into
LMMS:masterfrom
khoidauminh:fix-sample-zoom-freeze

Conversation

@khoidauminh

Copy link
Copy Markdown
Contributor

In the first loop of the function, resolution (float) gets added to the loop index. On extremely large indices this operation fails, resulting in an infinite loop.

Solution is to declare an int version of resolution for loop incrementing.

Fixes #7249

…thmetic and one of type int for loop incrementing
Comment thread src/gui/SampleWaveform.cpp Resolved

@zonkmachine zonkmachine left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested, issue fixed! Looks fine to me.

@khoidauminh
khoidauminh requested a review from Rossmaxx May 19, 2024 03:16

@Rossmaxx Rossmaxx left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@zonkmachine
zonkmachine merged commit 0071cb6 into LMMS:master May 19, 2024
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.

UI freezes when zooming to much in the song editor when there is a long sample track

4 participants

⌂