GNOME Bugzilla – Bug 611964
should adjust the zoom when adding clips to the timeline if everything is in view
Last modified: 2012-04-27 20:18:32 UTC
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.
Ah, another exception when this method should not be called: - when there is already enough space to fit the clip without readjusting the zoom In other words, only readjust if there is enough space to see all current clips, but not enough space to see all current clips + the newly inserted one.
*** Bug 582886 has been marked as a duplicate of this bug. ***
commit 66d0d68c98f20863b2747e55066fcdeafd2c45bd Author: Jean-François Fortin Tam <nekohayo@gmail.com> Date: Thu Apr 26 15:34:00 2012 -0400 Only do a "Zoom Fit" when the zoom is already fitted This prevents resetting the zoom if the user had zoomed in. This commit also prevents calling setBestZoomRatio too early. Fixes bug #611964