Skip to content

Fix PianoRoll m_positionLine misalignment on zoom#5965

Merged
Veratil merged 1 commit into
LMMS:masterfrom
Veratil:fix-pianoroll-positionline
Apr 15, 2021
Merged

Fix PianoRoll m_positionLine misalignment on zoom#5965
Veratil merged 1 commit into
LMMS:masterfrom
Veratil:fix-pianoroll-positionline

Conversation

@Veratil
Copy link
Copy Markdown
Contributor

@Veratil Veratil commented Mar 26, 2021

Fixes #5962

Adds comments to elaborate on what is being calculated.

@Veratil Veratil added the needs testing This pull request needs more testing label Mar 26, 2021
@LmmsBot
Copy link
Copy Markdown

LmmsBot commented Mar 26, 2021

🤖 Hey, I'm @LmmsBot from github.com/lmms/bot and I made downloads for this pull request, click me to make them magically appear! 🎩

Linux

Windows

macOS

🤖
{"platform_name_to_artifacts": {"Linux": [{"artifact": {"title": {"title": "(AppImage)", "platform_name": "Linux"}, "link": {"link": "https://13208-15778896-gh.circle-artifacts.com/0/lmms-1.3.0-alpha.1.85%2Bg1eeb855-linux-x86_64.AppImage"}}, "build_link": "https://circleci.com/gh/LMMS/lmms/13208?utm_campaign=vcs-integration-link&utm_medium=referral&utm_source=github-build-link"}], "Windows": [{"artifact": {"title": {"title": "64-bit", "platform_name": "Windows"}, "link": {"link": "https://13206-15778896-gh.circle-artifacts.com/0/lmms-1.3.0-alpha.1.85%2Bg1eeb8555d-mingw-win64.exe"}}, "build_link": "https://circleci.com/gh/LMMS/lmms/13206?utm_campaign=vcs-integration-link&utm_medium=referral&utm_source=github-build-link"}, {"artifact": {"title": {"title": "32-bit", "platform_name": "Windows"}, "link": {"link": "https://13209-15778896-gh.circle-artifacts.com/0/lmms-1.3.0-alpha.1.85%2Bg1eeb8555d-mingw-win32.exe"}}, "build_link": "https://circleci.com/gh/LMMS/lmms/13209?utm_campaign=vcs-integration-link&utm_medium=referral&utm_source=github-build-link"}, {"artifact": {"title": {"title": "32-bit", "platform_name": "Windows"}, "link": {"link": "https://ci.appveyor.com/api/buildjobs/add31i6g7eysnxjk/artifacts/build/lmms-1.3.0-alpha-msvc2017-win32.exe"}}, "build_link": "https://ci.appveyor.com/project/Lukas-W/lmms/builds/38413938"}, {"artifact": {"title": {"title": "64-bit", "platform_name": "Windows"}, "link": {"link": "https://ci.appveyor.com/api/buildjobs/dn4vflileilgwm49/artifacts/build/lmms-1.3.0-alpha-msvc2017-win64.exe"}}, "build_link": "https://ci.appveyor.com/project/Lukas-W/lmms/builds/38413938"}], "macOS": [{"artifact": {"title": {"title": "", "platform_name": "macOS"}, "link": {"link": "https://13207-15778896-gh.circle-artifacts.com/0/lmms-1.3.0-alpha.1.85%2Bg1eeb8555d-mac10.14.dmg"}}, "build_link": "https://circleci.com/gh/LMMS/lmms/13207?utm_campaign=vcs-integration-link&utm_medium=referral&utm_source=github-build-link"}]}, "commit_sha": "5d7a4a32f07d754e2cc8620629f134b1cdf75203"}

Copy link
Copy Markdown
Contributor

@IanCaio IanCaio left a comment

Choose a reason for hiding this comment

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

LGTM! Suggested a small fix on the comment about the width

if (pos >= m_currentPosition && pos <= m_currentPosition + width() - m_whiteKeyWidth)
// ticks relative to m_currentPosition
// < 0 = outside viewport left
// > width = outside viewport right
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.

Suggested change
// > width = outside viewport right
// > (width - piano keys width) = outside viewport right

Comment thread src/gui/editors/PianoRoll.cpp
@superpaik
Copy link
Copy Markdown
Contributor

It look good to me (windows 10)
I just noticed (not strictly related to this PR) that when playhead is not at pos 0 resizing or increasing vertical zoom does not break pianoroll.
Maybe the solution to this PR helps with #5863 (I'll write this on that PR, though)

@Feihei
Copy link
Copy Markdown

Feihei commented Mar 30, 2021

There's no problem in the win64 build now, I am using win10. Thanks.

@Veratil
Copy link
Copy Markdown
Contributor Author

Veratil commented Apr 14, 2021

Merging tomorrow unless anyone objects.

@Veratil Veratil merged commit 4bcae1a into LMMS:master Apr 15, 2021
@rubiefawn rubiefawn removed the needs testing This pull request needs more testing label May 12, 2026
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.

1.3 Alpha playhead behavior bug in pianoroll

6 participants