[Kst] kdeextragear-2/kst/kst
Rick Chern
rchern at interchange.ubc.ca
Thu Aug 19 19:34:01 CEST 2004
CVS commit by rchern:
Don't keep palette after changing to contour map just to remember its name.
M +9 -4 kstimage.cpp 1.18
M +1 -0 kstimage.h 1.13
--- kdeextragear-2/kst/kst/kstimage.cpp #1.17:1.18
@@ -186,7 +186,7 @@ void KstImage::save(QTextStream &ts) {
ts << " <upperthreshold>" << _zUpper << "</upperthreshold>" << endl;
ts << " <hascontourmap>" << _hasContourMap << "</hascontourmap>" << endl;
- ts << " <numcontourlines>" << _numContourLines << "</numcontourlines>" <<endl;
- ts << " <contourweight>" << _contourWeight << "</contourweight>" <<endl;
- ts << " <contourcolor>" << _contourColor.name() << "</contourcolor>" <<endl;
+ ts << " <numcontourlines>" << _numContourLines << "</numcontourlines>" << endl;
+ ts << " <contourweight>" << _contourWeight << "</contourweight>" << endl;
+ ts << " <contourcolor>" << _contourColor.name() << "</contourcolor>" << endl;
ts << " </image>" << endl;
}
@@ -277,4 +277,9 @@ void KstImage::changeToContourOnly(const
_hasColorMap = false;
_hasContourMap = true;
+ if (_pal) {
+ _lastPaletteName = _pal->name();
+ }
+ delete _pal;
+ _pal = 0L;
update();
}
@@ -326,5 +331,5 @@ QString KstImage::paletteName() const {
return _pal->name();
}
- return QString::null;
+ return _lastPaletteName;
}
--- kdeextragear-2/kst/kst/kstimage.h #1.12:1.13
@@ -111,4 +111,5 @@ class KstImage: public KstDataObject {
QColor _contourColor;
int _contourWeight; //_contourWeight = -1 means variable weight
+ QString _lastPaletteName;
};
More information about the Kst
mailing list