Bug 337594 - Save Default Update Type in Data Wizard
Summary: Save Default Update Type in Data Wizard
Status: RESOLVED FIXED
Alias: None
Product: kst
Classification: Applications
Component: general (show other bugs)
Version: 2.0.7
Platform: Other Other
: NOR wishlist
Target Milestone: ---
Assignee: kst
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-07-19 03:37 UTC by Ben Lewis
Modified: 2014-12-23 22:12 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 2.0.8
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ben Lewis 2014-07-19 03:37:27 UTC
On the first screen of the data wizard the user can choose the desired update type - "time interval", "change detection" or "no update". The default is "change detection". Once an update type has been selected for a particular file, Kst will remember this, which is great. But for a new file the user is forced to change this setting every time if they wish to use a setting other than "change detection". It would be great if the default setting could be saved somewhere.

Reproducible: Always

Steps to Reproduce:
1. Start the Data Wizard
2. Open a data file using the update type "time interval" or "no update"
3. Start a new session and start the Data Wizard again

Actual Results:  
The update type of the latest session defaults to "change detection".

Expected Results:  
The update type of the latest session should be remembered from the previous session.
Comment 1 Nicolas Brisset 2014-07-20 18:31:02 UTC
I gave it a quick try, by adding:
 
  dialogDefaults().setValue("wizard/updateType", _pageDataSource->updateType());
to datawizard.cpp (DataWizard::finished())

but I'm not really sure where to add the corresponding call to restore the last used value. It should certainly go to DataWizardPageDataSource::updateUpdateBox(), but there I seem to hit an issue, which is that the call to _dataSource->updateType() seems to default to returning 0, and I don't see how to distinguish between a 0 read from stored settings and a 0 as default value. The defaults are managed by NamedParameter, where I don't see an easy way to specify reading that value from the settings. 
Any help would be nice, maybe I'm on a completely wrong way...
Comment 2 Nicolas Brisset 2014-12-23 22:12:51 UTC
Fixed in 2.0.8 (see commit https://github.com/Kst-plot/kst/commit/e6abccf22f49d4941e5f6021ee261d54a2a605a1)