After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 611964 - should adjust the zoom when adding clips to the timeline if everything is in view
should adjust the zoom when adding clips to the timeline if everything is in ...
Status: RESOLVED FIXED
Product: pitivi
Classification: Other
Component: Timeline
Git
Other Linux
: Normal normal
: 0.91
Assigned To: Jean-François Fortin Tam
Pitivi maintainers
: 582886 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2010-03-06 01:05 UTC by Jean-François Fortin Tam
Modified: 2012-04-27 20:18 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Jean-François Fortin Tam 2010-03-06 01:05:47 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.
Comment 1 Jean-François Fortin Tam 2010-03-06 01:47:17 UTC
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.
Comment 2 Jean-François Fortin Tam 2012-02-19 21:14:07 UTC
*** Bug 582886 has been marked as a duplicate of this bug. ***
Comment 3 Jean-François Fortin Tam 2012-04-27 20:18:32 UTC
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