Summary: | kst crashes when opening a kst file with lots of plots/tabs in data mode | ||
---|---|---|---|
Product: | [Applications] kst | Reporter: | Matthew Truch <matt> |
Component: | general | Assignee: | kst |
Status: | RESOLVED FIXED | ||
Severity: | crash | ||
Priority: | NOR | ||
Version: | 1.x | ||
Target Milestone: | --- | ||
Platform: | Fedora RPMs | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Matthew Truch
2005-11-28 21:45:27 UTC
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); } |