Skip to content

Fix scrolling direction in SongEditor due to stuck Ctrl/Shift. - #5286

Merged
JohannesLorenz merged 1 commit into
LMMS:stable-1.2from
Cyp:fix-songeditor-scrolling
Dec 23, 2019
Merged

Fix scrolling direction in SongEditor due to stuck Ctrl/Shift.#5286
JohannesLorenz merged 1 commit into
LMMS:stable-1.2from
Cyp:fix-songeditor-scrolling

Conversation

@Cyp

@Cyp Cyp commented Oct 29, 2019

Copy link
Copy Markdown
Contributor

As far as I can tell, MainWindow::focusOutEvent never gets called no matter what I do, so clearKeyModifiers fails to be called.

@Cyp

Cyp commented Oct 29, 2019

Copy link
Copy Markdown
Contributor Author

/home/travis/build/LMMS/lmms/include/MainWindow.h:130:22: error: ‘deprecated’ attribute directive ignored [-Werror=attributes]
Should probably be compiled with -Wno-attributes with old compilers.

@Cyp
Cyp force-pushed the fix-songeditor-scrolling branch from 36bc837 to 4daf642 Compare October 31, 2019 07:40
@JohannesLorenz
JohannesLorenz self-requested a review December 12, 2019 18:26
@JohannesLorenz

JohannesLorenz commented Dec 12, 2019

Copy link
Copy Markdown
Contributor

A bit more info please: What is the issue you are fixing? What are the steps to reproduce that issue?
Edit: This info should also be in the commit message.

@JohannesLorenz

Copy link
Copy Markdown
Contributor

Not required but it will help future readers if you split stuff into multiple commits, e.g. cleanups, override fixes, ... It's not difficult, just a git reset --soft HEAD~1, and then git add on the files you want to add (or git add -p if a file shall be splitted).

@Cyp

Cyp commented Dec 13, 2019

Copy link
Copy Markdown
Contributor Author

It fixes that if scrolling with the mouse wheel in the Song Editor, it would often unexpectedly zoom or scroll horizontally instead of scrolling vertically, due to a stuck Ctrl/Shift state.

This was reproducible by switching away from LMMS using Ctrl+F[1-10] to change desktops, and switching back again without using Ctrl. Then LMMS would behave as if the Ctrl key was still down. Not sure how to reproduce Shift being stuck down, but it also happened sometimes somehow.

As a side effect, it should also fix a theoretical issue of it thinking Ctrl/Shift was down during the click when it was actually pressed after the click (might happen in the case of very slow computers).

@JohannesLorenz JohannesLorenz 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.

Testing worked. Code and style are OK. Only left 1 comment about .gitignore.

Comment thread .gitignore Outdated
@JohannesLorenz

Copy link
Copy Markdown
Contributor

I also tested the ctrl key issue, it's working. No regressions for shift and ctrl. Testing finished.

@Cyp
Cyp force-pushed the fix-songeditor-scrolling branch from 4daf642 to f96b544 Compare December 23, 2019 19:16
@JohannesLorenz
JohannesLorenz merged commit 42f7e26 into LMMS:stable-1.2 Dec 23, 2019
@JohannesLorenz

Copy link
Copy Markdown
Contributor

Thanks!

@PhysSong

Copy link
Copy Markdown
Member

FYI, I'm getting a deprecation warning since Knob::getValue() uses deprecated MainWindow::isShiftPressed(). It will break CircleCI builds on master branch.

@JohannesLorenz

Copy link
Copy Markdown
Contributor

I removed [[deprecated]] now on stable-1.2. Hopefully, this will fix the CI issues on master.

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.

3 participants