Bug 234396 - The ASCII datasource config widget no longer honors "Apply these settings as default"
Summary: The ASCII datasource config widget no longer honors "Apply these settings as ...
Status: RESOLVED FIXED
Alias: None
Product: kst
Classification: Applications
Component: general (show other bugs)
Version: 2.0.0
Platform: unspecified Linux
: NOR normal
Target Milestone: 2.0.0
Assignee: kst
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-04-15 00:07 UTC by Nicolas Brisset
Modified: 2010-11-12 10:42 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nicolas Brisset 2010-04-15 00:07:18 UTC
Version:           2.0.0_devel (using unspecified)
Compiler:          gcc (SUSE Linux) 4.4.1 
OS:                Linux

To reproduce:
- generate two ASCII test files with a specific, non-standard header configuration (lines to skip, line containing field names)
- try to load the first one from the datawizard and check that the listed field names are not read correctly
- come back to the first screen, and click the Configure... button. Set the appropriate settings, check the  "Apply these settings as default" box and click OK
- click next: the list of fields found should now be right
- create one or two plots from that file to check that it reads the data correctly
- launch the datawizard again and select the second file with the same non-standard formatting
- click Next: the field list is wrong, the previously set default settings have not been obeyed
Comment 1 Nicolas Brisset 2010-04-22 08:15:00 UTC
SVN commit 1117430 by brisset:

When reading a file with the ASCII datasource, always load ASCII defaults before attempting to load file-specific settings (asciisourceconfig.cpp).
Also avoid overriding those defaults with hard-coded values when no key exists for the given file (namedparameter.h). That issue is actually more a problem that the test in asciisourceconfig.cpp / AsciiSourceConfig::readGroup is not specific enough: fileName.isEmpty() triggers too easily => if the file has no settings stored, we still try to read its settings and since we find nothing we revert to hard-coded default values. With this patch, the constructor sets hard-coded defaults, then we override them with the ASCII source's general defaults, then with file-specific values, but only if there are some in QSettings. If you think this patch is wrong, we have to find a way to test for the existence of settings for the given file instead of just testing whether the filename is empty.

BUG: 234396

 M  +2 -3      asciisourceconfig.cpp  
 M  +1 -3      namedparameter.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1117430
Comment 2 Peter Kümmel 2010-08-14 12:14:49 UTC
Change version from 2.0.0_devel to 2.0.0 to simplify version numbering.
Comment 3 Peter Kümmel 2010-11-12 10:42:30 UTC
These bugs are solved with 2.0.0