Insert track should increment over existing track
Needs ReviewPublic

Authored by clintmoyer on Oct 7 2018, 7:30 PM.

Details

Summary

This removes previous hard-coding which assumed the user always wanted a video track. The track type in the dialog will be determined based on the currently selected track. The proposed track name will then be determined based on the track type.

Diff Detail

Repository
R158 Kdenlive
Lint
Lint Skipped
Unit
Unit Tests Skipped
clintmoyer requested review of this revision.Oct 7 2018, 7:30 PM
clintmoyer created this revision.
clintmoyer edited the summary of this revision. (Show Details)
clintmoyer edited the summary of this revision. (Show Details)Oct 29 2018, 6:52 PM

Thanks for this contribution. I integrated it in the refactoring_timeline branch in a simpler form - we don't use track names anymore. There is just a minor issue with translations I think.

src/timeline/customtrackview.cpp
7045

I don't think this will work for translations. It would be better to define a boolean, like: isVideoTrack, set to true if m_timeline->getTrackInfo(ix).type == VideoTrack.

Then in the while loop:
while (existingTrackNames.contains(proposedName)) {
proposedName = isVideoTrack ? i18n("Video %1", ++i) : i18n("Audio %1", ++i);
}