clipproperties: Keyframes added on play bug fixed

Authored by stefanzzz on Jul 4 2017, 4:04 PM.



When playing the preview, unintended keyframes were sometimes added. This
happened because changes in the source properties led to changes in spin
button values, which were misinterpreted as user inputs.

Depends on D1769

Diff Detail

rPTV Pitivi

We should rather make sure the callback is disconnected when playing I think.

thiblahute requested changes to this revision.Jul 4 2017, 9:08 PM
This revision now requires changes to proceed.Jul 4 2017, 9:08 PM

What I actually intended to do was make sure that I don't get the "value-changed" signal when I'm modifying the value of the spinbutton from code. That would ensure that keyframes are added only when the user is the one inputting a new value. I could do that by disconnecting the callback as well, but I figured a temporary block of the handler would be more appropriate (it seems like it should have less overhead).

aleb added a comment.Jul 7 2017, 9:02 PM

I remember in other places we use an instance field to know whether we are causing that event (and it should be ignored) or the user is. But this seems nice and usable in other places, I did not know about it.

thiblahute accepted this revision.Jul 9 2017, 11:04 PM

In other places we disconnect but you are right, using an handler block makes sense here.

This revision is now accepted and ready to land.Jul 9 2017, 11:04 PM
This revision was automatically updated to reflect the committed changes.