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

Pause & Stop playback buttons don't respond if click release occurs after caret has moved #237

Closed
moppius opened this issue Dec 30, 2016 · 2 comments
Milestone

Comments

@moppius
Copy link

moppius commented Dec 30, 2016

When playing back a tab, if the user presses the left mouse button on the Stop button in the playback widget, but doesn't release the mouse button until the playback caret has moved, the Stop button will not perform any action.

If the left mouse button is pressed and released before the playback caret moves, it functions as expected.

@moppius
Copy link
Author

moppius commented Dec 30, 2016

It looks like whenever the caret moves, the Score Area gains focus, which steals focus from the button that the user started to click. You can see this by noticing the pixel border of the button loses its highlight as soon as the caret moves after the button is clicked.

This problem will manifest on any button since the Qt "clicked" action requires a press and release event to occur while the widget has focus.

You can verify this by changing the connectButtonToAction method to SIGNAL(pressed()) instead of SIGNAL(clicked()). This will now always trigger correctly, but is not expected behaviour (e.g. you wouldn't be able to press and then move your mouse off the button and release to "cancel" the action).

It seems like the problem lies with the ScoreArea widget receiving focus every time the caret moves; it probably shouldn't, but I haven't figured out how to stop it from doing this yet :(

@moppius moppius changed the title Stop playback button doesn't respond if click release occurs after caret has moved Pause & Stop playback buttons don't respond if click release occurs after caret has moved Dec 30, 2016
@cameronwhite
Copy link
Member

Thanks for looking into this!

@cameronwhite cameronwhite added this to the Alpha 11 milestone Dec 30, 2016
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

No branches or pull requests

2 participants