Bug 508818

Summary: Rotation angle of transition incorrectly stored when using drag handle
Product: [Applications] kdenlive Reporter: Bernhard <bf>
Component: Audio Effects & TransitionsAssignee: balooii <balooii>
Status: RESOLVED FIXED    
Severity: normal CC: balooii
Priority: NOR    
Version First Reported In: 25.08.0   
Target Milestone: ---   
Platform: Kubuntu   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Bernhard 2025-08-27 18:49:41 UTC
SUMMARY
When a transition is applied to a clip and it is rotated using the rotation drag handle (the circle above the center) in the project monitor, the angle shown (and actually applied) in the effect stack is incorrect.

STEPS TO REPRODUCE
1. Freshly start kdenlive
2. insert a clip
3. add the transformation effect to the clip
4. go to the project monitor and rotate the frame with the mouse using the drag handle within the project monitor, let's say about 45°
5. observe the value of the rotation in the field within the effect stack.

OBSERVED RESULT
The stored rotation will be a really small amount, i.e. something between 0 and 3 degrees with some decimals. The rotation actually applied is exactly this very same value, although the red frame in the project monitor shows different. Move the cursors in the timeline back and forth to see.

This does not happen again, i.e. if you drag it a 2nd time, the value will be corrected.

I furthermore observed that this rotation value will be applied to other transitions "in the past" of the timeline. Unfortunately I don't yet know what exactly to do to reproduce this 2nd side effect.

EXPECTED RESULT
Represent the exact same value as in the project frame.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Kubuntu 25.04
KDE Plasma Version: 6.3.4
KDE Frameworks Version: 6.12.0
Qt Version: 6.8.3

ADDITIONAL INFORMATION
This is compile from source from the latest tag 25.08.0.
Comment 1 balooii 2025-08-28 18:08:41 UTC
Hi, and thanks for the report.

I am not able to reproduce it. When I do the steps as described the rotation angle on the monitor and the angle in the effect stack stay in sync and the frame is actually rotated as expected when I rotate to roughly 45 degree on the Monitor.

Are you able to reproduce it also on the latest stable AppImage v25.08.0 or the latest experimental build (latest build from master branch)  from here https://kdenlive.org/download/ ?

You mentioned you compile from source from the latest tag 25.08.0. I also tried that, but it works for me. commit id for this tag is 9a2e85a2 just to be sure. But also tried it on master and latest release image.

If you can still reproduce it maybe attach a screen recording.
Comment 2 Bernhard 2025-08-29 06:29:25 UTC
I just downloaded the latest app image and it behaves the same.

Here is a screen recording:

https://drive.google.com/drive/folders/1J9_lPSNO0adL0729QKOEejAqB5UyIRRu?usp=drive_link
Comment 3 balooii 2025-08-29 17:18:03 UTC
Thanks, that helped. I can reproduce the problem now.

It apparently only works when the play head is over the clip you're applying the effect on. When the play head is before or after the clip then only this miniscule rotation amount is applied.

Will investigate why and work on a fix.
Comment 4 Bug Janitor Service 2025-09-02 09:54:33 UTC
A possibly relevant merge request was started @ https://invent.kde.org/multimedia/kdenlive/-/merge_requests/723
Comment 5 Jean-Baptiste Mardelle 2025-09-05 06:38:26 UTC
Git commit 3ffc0d7e0c437162afbdc4e5f9dcf4a63fccd3c7 by Jean-Baptiste Mardelle, on behalf of balooii balooii.
Committed on 05/09/2025 at 06:37.
Pushed by mardelle into branch 'master'.

Fix Transform effect when current clip is not below play head / timeline cursor

M  +1    -0    src/assets/CMakeLists.txt
M  +18   -43   src/assets/keyframes/model/keyframemonitorhelper.cpp
M  +0    -4    src/assets/keyframes/model/keyframemonitorhelper.hpp
A  +112  -0    src/assets/keyframes/model/rect/rotatedrecthelper.cpp     [License: GPL(3+eV) GPL(v3.0)]
A  +67   -0    src/assets/keyframes/model/rect/rotatedrecthelper.hpp     [License: GPL(3+eV) GPL(v3.0)]
M  +2    -1    src/assets/view/widgets/keyframecontainer.cpp
M  +1    -0    src/assets/view/widgets/keyframecontainer.hpp

https://invent.kde.org/multimedia/kdenlive/-/commit/3ffc0d7e0c437162afbdc4e5f9dcf4a63fccd3c7
Comment 6 Jean-Baptiste Mardelle 2025-09-08 09:59:33 UTC
Git commit dec1ef2b54ed37ca402913a8d631c19c0b7c9bb7 by Jean-Baptiste Mardelle, on behalf of balooii balooii.
Committed on 08/09/2025 at 09:58.
Pushed by mardelle into branch 'release/25.08'.

Fix Transform effect when current clip is not below play head / timeline cursor

M  +1    -0    src/assets/CMakeLists.txt
M  +18   -43   src/assets/keyframes/model/keyframemonitorhelper.cpp
M  +0    -4    src/assets/keyframes/model/keyframemonitorhelper.hpp
A  +112  -0    src/assets/keyframes/model/rect/rotatedrecthelper.cpp     [License: GPL(3+eV) GPL(v3.0)]
A  +67   -0    src/assets/keyframes/model/rect/rotatedrecthelper.hpp     [License: GPL(3+eV) GPL(v3.0)]
M  +2    -1    src/assets/view/widgets/keyframecontainer.cpp
M  +1    -0    src/assets/view/widgets/keyframecontainer.hpp

https://invent.kde.org/multimedia/kdenlive/-/commit/dec1ef2b54ed37ca402913a8d631c19c0b7c9bb7