Refocus library#11767
Merged
Merged
Conversation
daschuer
requested changes
Jul 27, 2023
| // 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")); |
Member
There was a problem hiding this comment.
This should work when connecting to keyboard or controllers. Probably not a use case, but this would make it complete.
Suggested change
| ConfigKey("[Library]", "refocus_prev_widget")); | |
| ConfigKey("[Library]", "refocus_prev_widget")); | |
| m_pRefocusPrevWidgetCO->setButtonMode(ControlPushButton::TRIGGER); |
| // 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) |
Member
There was a problem hiding this comment.
What is the reason to not connect it in Qt 6?
Member
Author
There was a problem hiding this comment.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 :)