[Kst] [Bug 117234] kst crashes when opening a kst file with lots of plots/tabs in data mode
George Staikos
staikos at kde.org
Mon Nov 28 21:51:23 CET 2005
------- 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=117234
staikos kde org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
------- Additional Comments From staikos kde org 2005-11-28 21:51 -------
SVN commit 483949 by staikos:
don't crash when the plot is loaded but the curve is not done yet.
there are more cases to fix.
BUG: 117234
M +56 -14 kstvcurve.cpp
--- trunk/extragear/graphics/kst/kst/kstvcurve.cpp #483948:483949
@ -268,50 +268,92 @
void KstVCurve::point(int i, double &x, double &y) const {
- x = _inputVectors[COLOR_XVECTOR]->interpolate(i, NS);
- y = _inputVectors[COLOR_YVECTOR]->interpolate(i, NS);
+ KstVectorPtr xv = xVector();
+ if (xv) {
+ x = xv->interpolate(i, NS);
+ }
+ KstVectorPtr yv = yVector();
+ if (yv) {
+ y = yv->interpolate(i, NS);
+ }
}
void KstVCurve::getEXPoint(int i, double &x, double &y, double &ex) {
- x = _inputVectors[COLOR_XVECTOR]->interpolate(i, NS);
- y = _inputVectors[COLOR_YVECTOR]->interpolate(i, NS);
+ KstVectorPtr xv = xVector();
+ if (xv) {
+ x = xv->interpolate(i, NS);
+ }
+ KstVectorPtr yv = yVector();
+ if (yv) {
+ y = yv->interpolate(i, NS);
+ }
ex = _inputVectors[EXVECTOR]->interpolate(i, NS);
}
void KstVCurve::getEXMinusPoint(int i, double &x, double &y, double &ex) {
- x = _inputVectors[COLOR_XVECTOR]->interpolate(i, NS);
- y = _inputVectors[COLOR_YVECTOR]->interpolate(i, NS);
+ KstVectorPtr xv = xVector();
+ if (xv) {
+ x = xv->interpolate(i, NS);
+ }
+ KstVectorPtr yv = yVector();
+ if (yv) {
+ y = yv->interpolate(i, NS);
+ }
ex = _inputVectors[EXMINUSVECTOR]->interpolate(i, NS);
}
void KstVCurve::getEXPoints(int i, double &x, double &y, double &exminus, double &explus) {
- x = _inputVectors[COLOR_XVECTOR]->interpolate(i, NS);
- y = _inputVectors[COLOR_YVECTOR]->interpolate(i, NS);
+ KstVectorPtr xv = xVector();
+ if (xv) {
+ x = xv->interpolate(i, NS);
+ }
+ KstVectorPtr yv = yVector();
+ if (yv) {
+ y = yv->interpolate(i, NS);
+ }
explus = _inputVectors[EXVECTOR]->interpolate(i, NS);
exminus = _inputVectors[EXMINUSVECTOR]->interpolate(i, NS);
}
void KstVCurve::getEYPoint(int i, double &x, double &y, double &ey) {
- x = _inputVectors[COLOR_XVECTOR]->interpolate(i, NS);
- y = _inputVectors[COLOR_YVECTOR]->interpolate(i, NS);
+ KstVectorPtr xv = xVector();
+ if (xv) {
+ x = xv->interpolate(i, NS);
+ }
+ KstVectorPtr yv = yVector();
+ if (yv) {
+ y = yv->interpolate(i, NS);
+ }
ey = _inputVectors[EYVECTOR]->interpolate(i, NS);
}
void KstVCurve::getEYMinusPoint(int i, double &x, double &y, double &ey) {
- x = _inputVectors[COLOR_XVECTOR]->interpolate(i, NS);
- y = _inputVectors[COLOR_YVECTOR]->interpolate(i, NS);
+ KstVectorPtr xv = xVector();
+ if (xv) {
+ x = xv->interpolate(i, NS);
+ }
+ KstVectorPtr yv = yVector();
+ if (yv) {
+ y = yv->interpolate(i, NS);
+ }
ey = _inputVectors[EYMINUSVECTOR]->interpolate(i, NS);
}
void KstVCurve::getEYPoints(int i, double &x, double &y, double &eyminus, double &eyplus) {
- x = _inputVectors[COLOR_XVECTOR]->interpolate(i, NS);
- y = _inputVectors[COLOR_YVECTOR]->interpolate(i, NS);
+ KstVectorPtr xv = xVector();
+ if (xv) {
+ x = xv->interpolate(i, NS);
+ }
+ KstVectorPtr yv = yVector();
+ if (yv) {
+ y = yv->interpolate(i, NS);
+ }
eyplus = _inputVectors[EYVECTOR]->interpolate(i, NS);
eyminus = _inputVectors[EYMINUSVECTOR]->interpolate(i, NS);
}
More information about the Kst
mailing list