Skip to content
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

Improved Tracks (simpler numbering, faster inserting, prevent deletion of locked tracks) #2491

Merged
merged 4 commits into from
Dec 30, 2018

Conversation

jonoomph
Copy link
Member

This is a pretty big re-write of the Track / Layers logic, with respects to how we number them, and how we insert, add, and remove them. The tracks numbering is now spread out:
Track 5 (number: 5,000,000)
Track 4 (number: 4,000,000)
Track 3 (number: 3,000,000)
Track 2 (number: 2,000,000)
Track 1 (number: 1,000,000)

Inserting a new track now simply picks a number halfway between the gap... for example:
Track 5 (number: 5,000,000)
Track 4 (number: 4,000,000)
Inserted Track (number 3,500,000)
Track 3 (number: 3,000,000)
Track 2 (number: 2,000,000)
Track 1 (number: 1,000,000)

With this logic, no other data is required to change, and it all magically works. However, if a user inserts around 30 tracks at the exact same spot, the 1/2'ing will eventually run out of a gap, and will then renumber things that conflict (similar to the current logic).

Also, disabled tracks are now blocked from the "Delete" context menu.

Otherwise, the behavior of Tracks is identical to before, just faster, simpler, and more stable.

…amic numbering system, a simpler display system, and much less processing for most insert track operations. Track numbering is spaced out in increments of 1,000,000. Inserting does not need to move clips around, but rather find the mid point of the gap. This works for the first 30 or so inserts, and then when the gap is too small, we start renaming and moving items that are conflicting.
…e' view. We now display labels if any found, and use the same display logic everywhere a track is displayed.
@jonoomph
Copy link
Member Author

I've updated this PR to also fix some issues with "Add to Timeline" and "Properties" views not display the correct track name (or customized track name). We should now be correctly displaying track names everywhere they are found.

@jonoomph jonoomph merged commit c0408c5 into develop Dec 30, 2018
@jonoomph jonoomph deleted the improved-tracks branch December 30, 2018 00:25
@jonoomph jonoomph restored the improved-tracks branch January 8, 2019 22:27
@jonoomph jonoomph deleted the improved-tracks branch January 8, 2019 22:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant