Version: 1.2.0_svn_502068 (using KDE KDE 3.5.0) OS: Linux How to Reproduce: Create at least on plot that has a legend. Change the legend text of at least one of the curves displayed on the legend to something other than the default name. Save a .kst file for the session. Close kst. Open kst with the saved .kst file. What Happens: Kst is loaded with the exact same state as when you clicked save EXCEPT that the custom legend name(s) have been forgotten. Expected Behavior: Kst saves the Legend Text into the .kst files appropriatly.
SVN commit 502146 by arwalker: BUG:120746 Save the custom legend text associated with a curve or image. M +3 -0 kstimage.cpp M +3 -1 kstvcurve.cpp --- trunk/extragear/graphics/kst/kst/kstimage.cpp #502145:502146 @@ -47,6 +47,8 @@ in_tag = e.text(); } else if (e.tagName() == "matrixtag") { in_matrixName = e.text(); + } else if (e.tagName() == "legend") { + setLegendText(e.text()); } else if (e.tagName() == "palettename") { in_paletteName = e.text(); } else if (e.tagName() == "lowerthreshold") { @@ -176,6 +178,7 @@ if (_inputMatrices.contains(THEMATRIX)) { ts << l2 << "<matrixtag>" << QStyleSheet::escape(_inputMatrices[THEMATRIX]->tagName()) << "</matrixtag>" << endl; } + ts << l2 << "<legend>" << QStyleSheet::escape(legendText()) << "</legend>" << endl; ts << l2 << "<hascolormap>" << _hasColorMap << "</hascolormap>" <<endl; if (_pal) { ts << l2 << "<palettename>" << QStyleSheet::escape(_pal->name()) << "</palettename>" << endl; --- trunk/extragear/graphics/kst/kst/kstvcurve.cpp #502145:502146 @@ -140,7 +140,8 @@ eyminusname = e.text(); } else if (e.tagName() == "color") { in_color.setNamedColor(e.text()); - + } else if (e.tagName() == "legend") { + setLegendText(e.text()); // the following options are only needed to change from the default } else if (e.tagName() == "hasLines") { HasLines = (e.text() != "0"); @@ -463,6 +464,7 @@ ts << l2 << "<tag>" << QStyleSheet::escape(tagName()) << "</tag>" << endl; ts << l2 << "<xvectag>" << QStyleSheet::escape(_inputVectors[COLOR_XVECTOR]->tagName()) << "</xvectag>" << endl; ts << l2 << "<yvectag>" << QStyleSheet::escape(_inputVectors[COLOR_YVECTOR]->tagName()) << "</yvectag>" << endl; + ts << l2 << "<legend>" << QStyleSheet::escape(legendText()) << "</legend>" << endl; ts << l2 << "<hasMinus/>" << endl; if (_inputVectors.contains(EXVECTOR)) { ts << l2 << "<exVectag>" << QStyleSheet::escape(_inputVectors[EXVECTOR]->tagName()) << "</exVectag>" << endl;