Bug 411256 - Track ordering does not work as expected
Summary: Track ordering does not work as expected
Status: RESOLVED FIXED
Alias: None
Product: kdenlive
Classification: Applications
Component: User Interface (show other bugs)
Version: 19.08.0
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Jean-Baptiste Mardelle
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-08-24 20:25 UTC by ritalat
Modified: 2019-10-11 00:51 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 19.08.2
fritzibaby: Brainstorm+


Attachments
Inconsistent track ordering. (33.61 KB, image/jpeg)
2019-08-24 20:25 UTC, ritalat
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ritalat 2019-08-24 20:25:04 UTC
Created attachment 122327 [details]
Inconsistent track ordering.

SUMMARY
The ordering of tracks does not work as expected.

STEPS TO REPRODUCE
1. Add a few new av tracks
2. Change between mixed and split views

OBSERVED RESULT
The ordering of tracks is not intuitive. (see attachment)

EXPECTED RESULT
The tracks would be ordered in an intuitive way
mixed: V3, A3, V2, A2, V1, A1 etc.
split: V3, V2, V1, A1, A2, A3

SOFTWARE/OS VERSIONS
KDE Plasma Version: 5.16.4
KDE Frameworks Version: 5.61.0
Qt Version: 5.13.0
Comment 1 emohr 2019-08-25 10:51:00 UTC
Thank you for reporting. Issue is known: https://invent.kde.org/kde/kdenlive/issues/220. No workaround so far.
Comment 2 ahiijny 2019-09-09 06:54:57 UTC
Something to do with TimelineModel::getTrackSortValue, maybe? https://invent.kde.org/kde/kdenlive/blob/90d5443c7a0bed99fa1dc5a33e668074ce112bc9/src/timeline2/model/timelinemodel.cpp#L329

I'm not familiar with this codebase at all, but... Looking at a .kdenlive save file, it looks like the tracks are normally ordered audio (descending) and then video (ascending).

separated == 1 -> natural order (e.g. A3, A2, A1, V1, V2, V3)
separated == 2 -> ascending audio, and then ascending video (e.g. A1, A2, A3, V1, V2, V3)
else -> so this must be mixed order, but I think there's a mistake here. aCount * trackPos? That doesn't look right...
Comment 3 Jean-Baptiste Mardelle 2019-09-10 05:44:34 UTC
Git commit 15ddd416647f4727ce6bb3bad39cc6500c78b272 by Jean-Baptiste Mardelle.
Committed on 10/09/2019 at 05:44.
Pushed by mardelle into branch 'Applications/19.08'.

Fix mixed audio track sorting.
Related to #220

M  +7    -6    src/timeline2/model/timelinemodel.cpp

https://invent.kde.org/kde/kdenlive/commit/15ddd416647f4727ce6bb3bad39cc6500c78b272
Comment 4 emohr 2019-09-10 16:52:36 UTC
@ahiijny. Thank you for the hint.

Solved with upcoming 19.08.2.
Comment 5 ritalat 2019-10-11 00:51:53 UTC
19.08.2 definitely improved it but "split audio tracks" still does not order properly for me after adding a new av track. A1 and V1 are not in the correct position.