-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Clean up PianoRoll selection #6170
base: master
Are you sure you want to change the base?
Conversation
Is there any benefit to this change? The current behavior provides clearer feedback on what's selected.
I would consider this expected behavior.
I tend to click near the horizontal lines when box selecting and expect the box to select notes either above or below the line depending on my selection endpoint. If there's any bug here I'd say it's the fact that selecting near the bottom line of a note includes that note in the selection, rather than snapping the selection edge to the closest grid line. Rest looks good to me. |
Yes, I like the visual feedback too. But either way it should be consistent with box select (and with song editor)
I disagree. Actions where a modifier key needs to be pressed before the mouse button should only finish when the mouse button that started it is released. (In contrast to things like unqunatize, which can be toggled on/off during drag). Pressing Esc, another mouse button or key should, if anything, cancel the action. Just look at file managers, GIMP, Blender and LMMS knob automation.
This is a interesting and good point. The only exception would be when clicking to select a single note. Maybe there is some way to combine these two? I will give it a look. |
Piano roll box select is the one that should be changed then. Both selection modes in the song editor (box and timeline) select during the action, as does (currently) the timeline select in piano roll.
Can be accomplished without removing the selection.
Ought to be possible either way.
I can't say I've ever thought to release ctrl when doing a ctrl+drag action, but you seem to be correct. Carry on then :)
I would do this by dragging from slightly above it to slightly below. If the selection top & bottom always snaps to the nearest note edge this works and can be rationalized as consistent w/ the song editor. There's also a "select all notes on this key" option when right clicking piano keys. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not needed, but preferred.
I've sat on replying to this until now since I was thinking about the changes (since I've been focused on the piano roll more than any other dev lately).
Other than that, looks okay to me. |
Good thoughts @Veratil.
After realizing this I was about to revert them. But then again they might prove useful in the future for
No, I will have to double-check the code paths. |
@Spekular, this was more complicated than expected, due to toggle-selection with shift. We'd have to do something like |
EDIT: this part is reverted
|
Code wise things LGTM, but I want to test drive this before approving so it doesn't do anything unexpected. O build bot where art thou? |
Just tested this code again and I disagree. If I start a selection with the mouse hovering a note, that note should always be selected, no matter which grid line I was closest to. See problem: select.mp4This actually matches the behavior of Song editor, because it selects whatever the selection box touches. The major difference is that the selection box does not snap to the grid in Song editor. |
- Always include clicked note in selection box - Timeline selection draws box - Fix timeline selection to include highest notes - Fix bug when ctrl is released and pressed during selection - Fix off-by-one issue for Y axis
f9bf40f
to
19f1776
Compare
🤖 Hey, I'm @LmmsBot from github.com/lmms/bot and I made downloads for this pull request, click me to make them magically appear! 🎩
Windows
Linux
macOS🤖{"platform_name_to_artifacts": {"Windows": [{"artifact": {"title": {"title": "32-bit", "platform_name": "Windows"}, "link": {"link": "https://output.circle-artifacts.com/output/job/f90ef64c-7064-4dc9-b4bc-978968ef22a6/artifacts/0/lmms-1.3.0-alpha.1.182+g7f6999799-mingw-win32.exe"}}, "build_link": "https://circleci.com/gh/LMMS/lmms/16148?utm_campaign=vcs-integration-link&utm_medium=referral&utm_source=github-build-link"}, {"artifact": {"title": {"title": "64-bit", "platform_name": "Windows"}, "link": {"link": "https://output.circle-artifacts.com/output/job/f89bd314-ee72-4149-ad29-c03599897dc1/artifacts/0/lmms-1.3.0-alpha.1.182+g7f6999799-mingw-win64.exe"}}, "build_link": "https://circleci.com/gh/LMMS/lmms/16147?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/kqmnrqdvsop1a9fk/artifacts/build/lmms-1.3.0-alpha-msvc2017-win32.exe"}}, "build_link": "https://ci.appveyor.com/project/Lukas-W/lmms/builds/43201305"}, {"artifact": {"title": {"title": "64-bit", "platform_name": "Windows"}, "link": {"link": "https://ci.appveyor.com/api/buildjobs/hui7a6re3lg5jxdf/artifacts/build/lmms-1.3.0-alpha-msvc2017-win64.exe"}}, "build_link": "https://ci.appveyor.com/project/Lukas-W/lmms/builds/43201305"}], "Linux": [{"artifact": {"title": {"title": "(AppImage)", "platform_name": "Linux"}, "link": {"link": "https://output.circle-artifacts.com/output/job/74cc832a-0b82-4121-9be8-68bdba6aca9c/artifacts/0/lmms-1.3.0-alpha.1.182+g7f6999799-linux-x86_64.AppImage"}}, "build_link": "https://circleci.com/gh/LMMS/lmms/16145?utm_campaign=vcs-integration-link&utm_medium=referral&utm_source=github-build-link"}], "macOS": [{"artifact": {"title": {"title": "", "platform_name": "macOS"}, "link": {"link": "https://output.circle-artifacts.com/output/job/d56bc8e1-3587-4679-ad04-58aa49444e6b/artifacts/0/lmms-1.3.0-alpha.1.182+g7f6999799-mac10.14.dmg"}}, "build_link": "https://circleci.com/gh/LMMS/lmms/16146?utm_campaign=vcs-integration-link&utm_medium=referral&utm_source=github-build-link"}]}, "commit_sha": "f7be357809f77435e90c06ee981d8d48fb60dfb4"} |
In order of appearance:
getTick
yCoordOfKey
xCoordOfTick
(taken frompaintEvent
)m_select*
members store start/end instead of start/lengthmade to work like Song editor - first draw box, then apply (see video).draws a boxm_action
, don't care aboutm_editMode
. This makesremoveSelection()
, unnecessary.getKey()
was 2 pixels off, and keys below the bottom line was a whole key off.selectAll()
simply selects all notes, instead of drawing a box around them (see video)select.mp4