Bug 862 - PV should probably start with a clean slate when -i is used
Summary: PV should probably start with a clean slate when -i is used
Status: RESOLVED FIXED
Alias: None
Product: PulseView
Classification: Unclassified
Component: Other (show other bugs)
Version: unreleased development snapshot
Hardware: All All
: Normal normal
Target Milestone: ---
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-11-01 21:37 CET by Uwe Hermann
Modified: 2017-06-07 00:07 CEST (History)
1 user (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Uwe Hermann 2016-11-01 21:37:57 CET
When running "pulseview -i foo.sr" users generally expect that PV loads that file (and that file only) in a new/empty session/window.

Currently however, that'll generally yield two sessions, the "old" saved one from the last PV run and the new one that the user actually wanted (-i foo.sr), which requires some annoying manual work to get rid of the unwanted "old" session.
Comment 1 Soeren Apel 2017-06-06 14:28:34 CEST
I'd like PV to perform non-destructive actions by default, meaning that -i should append the file to the current set of sessions.

Instead of changing the behavior for -i, I'd like to implement a switch -n (for --no-sessions) that, when supplied, prevents the previous set of sessions from being restored.

This way, supplying -i doesn't destroy the session storage when users don't expect it and if they do want to only show the file supplied by -i, they can supply -n as well. Destroying the session storage then becomes an intended action and won't surprise the user.
Comment 2 Soeren Apel 2017-06-06 14:30:55 CEST
Note: -n can then also be used by those who (unfortunately) encounter the issue where PV crashes when the session storage contains invalid data. Before, users would have to locate the session storage and move/delete the file manually - and in the case of OSX, also manually trigger a rebuild of the settings cache.
Comment 3 Uwe Hermann 2017-06-07 00:07:49 CEST
Fixed in 156f06e95f10587063b97b6b453a603751a0007c, thanks!

The new CLI options is -c, and there's bug #973 for potentially adding an -n option as well.