Version: 1.5.0 (using KDE KDE 3.5.8) Installed from: Compiled From Sources Compiler: gcc (GCC) 4.1.2 OS: Linux Using the Edit Vector dialogue box to change the datasource of a vector, corrupts .kst files. The problem is that the datasouce encoded into the vector's tag in the .kst file (using the "<datasource>/<field>" format) isn't properly updated. Steps to reproduce: 1. Plot a field from a datasource. 2. Right click on the plot -> Edit -> Vector 3. In the Edit Vector dialogue, change the datasource to something else that provides the same field. 4. File -> Save -> save session to a .kst file 5. File -> Open -> open the kst file just created. Results: kst will claim to be unable to load the kst file due the vector being missing. Expected results: kst should be able to load the kst file. The .kst file corruption can be undone by manually editing the .kst file and deleting all the "<datasource>/" parts from vector tag.
Seems to be more problems with the hierarchical naming scheme
This problem occurs because in the KstRvector constructor the specified tag name is overriden in the following code: if (in_file) { // use datasource as tag context for this RVector // allow unique vector names to be displayed at top-level setTagName(KstObjectTag(tag().tag(), in_file->tag(), false)); } However, the corresponding tagname in the curve attributes is not changed in the same way so the curve is left with a vector that could not be found. The solution is one of the following: * not to override the vector tagname when it is loaded * to update the curve's vector tagname similarly when loaded * when the datasource is changed change the tagname at that point so the overriding of the vector tagname when it is loaded has no effect
See also bug #141597
SVN commit 748562 by arwalker: BUG:153393 update tag name when file is changed M +4 -5 libkst/kstrvector.cpp M +0 -1 libkstapp/kstvectordialog_i.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=748562