-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Refocus library #11767
Refocus library #11767
Conversation
// to call refocusPrevLibraryWidget() are cumbersome to connect to. | ||
// This CO is never actually set or read so the value just needs to be not 0 | ||
m_pRefocusPrevWidgetCO = std::make_unique<ControlPushButton>( | ||
ConfigKey("[Library]", "refocus_prev_widget")); |
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.
This should work when connecting to keyboard or controllers. Probably not a use case, but this would make it complete.
ConfigKey("[Library]", "refocus_prev_widget")); | |
ConfigKey("[Library]", "refocus_prev_widget")); | |
m_pRefocusPrevWidgetCO->setButtonMode(ControlPushButton::TRIGGER); |
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.
Interesting! Will try.
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.
Jup, works. Thanks.
// This CO is never actually set or read so the value just needs to be not 0 | ||
m_pRefocusPrevWidgetCO = std::make_unique<ControlPushButton>( | ||
ConfigKey("[Library]", "refocus_prev_widget")); | ||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) |
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.
What is the reason to not connect it in Qt 6?
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.
QML. No legacy library widgets, so it's guarded like the other functions that work with these widgets.
Useful to return to the library workflow in case it was interrupted by clicking on a beatsize spinbox, effect selector or any other widget that grabs keyboard focus.
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.
LGTM, Thank you.
Another little GUI helper:
When clicking into any beatsize spinbox or selecting an effect/effect chain via the GUI selectors these widgets get keyboad focus. This interrupts the current library workflow (and keyboard shortcuts wouldn't work anymore) since you'd need to Tab, Esc or click to get back to the desired library widget.
Currently the focus is set to the Tracks table since that is the most likely place to be when DJing, but obviously not always.
With this PR the library widget that was focused previously is stored and can be foused again any time by any widget/object that has controlobject.h included via
(any value except 0 will do, it's just triggering a valueChangeRequest)
Especially helpful for #11755 :)