Bug 236 - After loading a file, a "Zoom to Fit" should be done
Summary: After loading a file, a "Zoom to Fit" should be done
Status: RESOLVED FIXED
Alias: None
Product: PulseView
Classification: Unclassified
Component: Data display (show other bugs)
Version: unreleased development snapshot
Hardware: All All
: Normal normal
Target Milestone: ---
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-01 19:46 CET by Ulfl
Modified: 2017-07-06 01:01 CEST (History)
3 users (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ulfl 2014-01-01 19:46:42 CET
After loading a file, the display is filled up with data - good. But you only see the first portion of the data and not the whole thing.

It would be nice, if the display would "zoom to fit" when the file was fully loaded, so the whole file content can be seen at a glance.
Comment 1 Joel Holdsworth 2014-01-02 10:05:04 CET
To properly solve this, we need to zoom-fit before all the data arrives. It's no good doing it afterward - a large file could take 30s to load, and the user may be inspecting something.

The problem then is how to find out the length of the file before it's completely loaded? Is there some way this could be exposed in the new sigrok API. Certainly with the proposed new file format we would know the length. Do we know it already with the current file format?
Comment 2 Soeren Apel 2015-08-23 21:39:04 CEST
Note: while not a fix for this bug it's worth mentioning that you can now press the "zoom to fit" button while the file is loading and it will continue fitting all samples on screen until the file is fully loaded.

Also, an issue I'm seeing here is that there's no guarantee that we *always* know the length of the data upfront. It may be doable for srzip or the future file format but for others, this may be impossible. This will cause confusion as a future "zoom to fit after loading" function works for some file formats and not others, so it needs careful integration.
Comment 3 Uwe Hermann 2017-07-06 01:01:33 CEST
Fixed in 28ceff251c776bcf99eafae691e70a521af15957, thanks!