-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Add QmlControlProxy::trigger() #15420
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
base: main
Are you sure you want to change the base?
Conversation
…hot QTimer for value resetting after event loop processing. Replaced the existing hardcoded trigger function in Sampler.qml by calling the new method.
|
IMO it would be better if |
4fa74c3 to
311b316
Compare
311b316 to
bd6306f
Compare
@acolombier wrote in #14849 (comment) that both states are important for property binding. Therefore I implemented it this way. |
|
I believe you might be able to also emit the two signals back to back so they both get addressed in the eventloop, in case you don't want to use the timer. Thanks for looking into this! <3 |
Right, thanks for the pointer. I still didn't find a way where this was actually required. I can only find this used for the "eject" control. mixxx/src/widget/wtrackmenu.cpp Lines 2571 to 2572 in 3c35370
IMO we should first fix the eject CO behavior and then see if the double value in the event loop is required anywhere else. I think the primary issue stems from the fact that "eject" is set up as |
|
AFAIS, this snippet would indeed induce two consecutive emits (one for So in theory, you should be able to remove the |
We've also mixxx/res/controllers/common-controller-scripts.js Lines 265 to 271 in 6adb012
Which is used for many other controls: Why do you think this is specific for "eject" ? |
This PR adds a trigger method to QmlControlProxy. This is using a single shot timer with zero interval, to ensure that both updates (1 then 0) will correctly be reported to the CO slots, as two seperate events in the event loop.