should adjust the zoom when adding clips to the timeline if everything is in view
Submitted by Jeff F.T.
Assigned to Jeff F.T.
We have a _setBestZoomRatio method somewhere in mainwindow.py. If I understand correctly, it is the one that automatically sets the zoom level to "fit" the length of the timeline when:
- loading a project with clips on the timeline
- adding the very first clip to the timeline
However, it is not called when adding the 2nd, 3rd, 4th, and other clips to the timeline. This is what this bug report is about: preventing the need for the user to constantly zoom out as he adds clips to the timeline (especially if they have very short or varying lengths).
To do that, we should call this method when:
- the entirety of clips are visible by the user in the timeline canvas (ie: the zoom is "already" fitted to the entire view).
But not when:
- the user has already zoomed in (ie: only a portion of the clips on the timeline canvas is seen); we assume the user zoomed-in on purpose and wants to stay at that zoom level. If the user wants the timeline to autofit on clip insertion again, he'll just have to zoom-out to see the whole timeline and it will work.
Imported from https://bugzilla.gnome.org/show_bug.cgi?id=611964