[Kst] [Bug 120746] saved .kst files don't save the Legend Text of a curve
Andrew Walker
arwalker at sumusltd.com
Wed Jan 25 00:27:35 CET 2006
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
http://bugs.kde.org/show_bug.cgi?id=120746
arwalker sumusltd com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
------- Additional Comments From arwalker sumusltd com 2006-01-25 00:27 -------
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;
More information about the Kst
mailing list