[Kst] kdeextragear-2/kst/kst

Barth Netterfield netterfield at astro.utoronto.ca
Tue Dec 21 17:30:05 CET 2004


CVS commit by netterfield: 

BUG:
Images could not be loaded from .kst files. This fixes that.

Discussion:
The bug appears to come in with the introduction of lazy loading data objects:
The plots attempt to draw the image before the matrixes have been loaded and
added to the image.
What I don't understand is why this doesn't happen w/ curves - apparently,
the problem is being solved in a different way for curves/vectors than
for Images/Matrixes.


  M +9 -4      kstimage.cpp   1.22


--- kdeextragear-2/kst/kst/kstimage.cpp  #1.21:1.22
@@ -67,4 +67,5 @@ KstImage::KstImage(QDomElement& e) : Kst
     n = n.nextSibling();
   }
+  _matrix = 0L;
   _inputMatrixLoadQueue.append(qMakePair(QString("THEMATRIX"), in_matrixName));
 
@@ -321,8 +322,12 @@ void KstImage::changeToColorAndContour(c
 
 void KstImage::matrixDimensions(double &x, double &y, double &width, double &height) {
+  if (_matrix) {
   x = _matrix->minX();
   y = _matrix->minY();
   width = _matrix->xNumSteps() * _matrix->xStepSize();
   height = _matrix->yNumSteps() * _matrix->yStepSize();
+  } else {
+    x = y = width = height = 0;
+  }
 }
 




More information about the Kst mailing list