Discussion:
[kst] [Bug 394448] New: Not able to change data file (ASCII),
b***@kde.org
2018-05-19 16:10:13 UTC
Permalink
https://bugs.kde.org/show_bug.cgi?id=394448

Bug ID: 394448
Summary: Not able to change data file (ASCII), message: "The
file could not be loaded or contains no data."
Product: kst
Version: 2.0.8
Platform: Compiled Sources
OS: MS Windows
Status: UNCONFIRMED
Severity: normal
Priority: NOR
Component: datasources
Assignee: ***@kde.org
Reporter: ***@hotmail.de
Target Milestone: ---

What I did:
1. Load a small ASCII data file with the data wizard, and create a plot
2. Save to new .kst file and close kst
3. Start kst and open this .kst file again
4. Go to change data file dialog and select a different ASCII file, click ok
5. Go to change data file dialog again, select the ASCII file from step 1.

What I expected: The data file from step 1 should be accepted and plotted,
because the file is ok and still in its location.

What happened: The file is not accepted, the program returns: "The file could
not be loaded or contains no data."

I downloaded the latest source code and traced the message back to method
ChangeFileDialog::apply(), where the message box is created upon
!_dataSource->isValid().

The _isValid attribute is false, because it is set to false by call to method
reset() in AsciiSource::parseProperties. This method is called when the .kst
file is loaded, after creation of the AsciiSource.

I removed the call to reset() and the problem dissapeared. I did not create a
patch because I'm not sure about side effects.
--
You are receiving this mail because:
You are the assignee for the bug.
b***@kde.org
2018-05-19 16:13:08 UTC
Permalink
https://bugs.kde.org/show_bug.cgi?id=394448

***@hotmail.de changed:

What |Removed |Added
----------------------------------------------------------------------------
Keywords| |usability
--
You are receiving this mail because:
You are the assignee for the bug.
b***@kde.org
2018-11-23 13:24:28 UTC
Permalink
https://bugs.kde.org/show_bug.cgi?id=394448

***@astro.utoronto.ca changed:

What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Latest Commit| |https://commits.kde.org/kst
| |-plot/6435d09b739f81524f280
| |e08f2e17634799db4ae
Status|REPORTED |RESOLVED

--- Comment #1 from ***@astro.utoronto.ca ---
Git commit 6435d09b739f81524f280e08f2e17634799db4ae by Barth Netterfield.
Committed on 16/11/2018 at 21:56.
Pushed by netterfield into branch 'master'.

Don't invalidate ascii files when you reset them.
Apply fix suggested by reporter. Ascii files don't actually ever
check to see if an ascii file is valid so there is no point
in invalidating it.

M +1 -1 src/datasources/ascii/asciisource.cpp

https://commits.kde.org/kst-plot/6435d09b739f81524f280e08f2e17634799db4ae
--
You are receiving this mail because:
You are the assignee for the bug.
Loading...