[Kst] kdeextragear-2/kst/kst

George Staikos staikos at kde.org
Thu Mar 18 10:25:30 CET 2004


CVS commit by staikos: 

revert last - majorly broke loading


  M +8 -1      kstequationcurve.cpp   1.50
  M +5 -7      kstvcurve.cpp   1.31


--- kdeextragear-2/kst/kst/kstequationcurve.cpp  #1.49:1.50
@@ -188,5 +188,5 @@ KstObject::UpdateType KstEquationCurve::
   bool force = false;
 
-  if (KstObject::checkUpdateCounter(update_counter) || !*_xVector || !*_yVector) {
+  if (KstObject::checkUpdateCounter(update_counter)) {
     return NO_CHANGE;
   }
@@ -200,4 +200,11 @@ KstObject::UpdateType KstEquationCurve::
   }
 
+  if (_xVector == _inputVectors.end()) {
+    _xVector = _inputVectors.find(XVECTOR);
+    if (!*_xVector) { // This is technically sort of fatal
+      return NO_CHANGE;
+    }
+  }
+
   KstVectorPtr v = *_xVector;
   MaxX = v->max();

--- kdeextragear-2/kst/kst/kstvcurve.cpp  #1.30:1.31
@@ -103,4 +103,6 @@ bool KstVCurve::loadInputs() {
       if (!VX.data()) {
         KstDebug::self()->log(i18n("Unable to find X vector for %2: [%1]").arg((*i).second).arg(tagName()), KstDebug::Warning);
+        KST::vectorList.lock().readUnlock();
+        return false;
       }
     } else if ((*i).first == YVECTOR) {
@@ -108,4 +110,6 @@ bool KstVCurve::loadInputs() {
       if (!VY.data()) {
         KstDebug::self()->log(i18n("Unable to find Y vector for %2: [%1]").arg((*i).second).arg(tagName()), KstDebug::Warning);
+        KST::vectorList.lock().readUnlock();
+        return false;
       }
     } else if ((*i).first == EXVECTOR) {
@@ -117,9 +121,4 @@ bool KstVCurve::loadInputs() {
   KST::vectorList.lock().readUnlock();
 
-  if (!VX || !VY) {
-    KstDebug::self()->log(i18n("Unable to load X or Y vector for %1").arg(tagName()), KstDebug::Error);
-    return false;
-  }
-
   VX->readLock();
   VY->readLock();
@@ -148,7 +147,6 @@ KstVCurve::~KstVCurve() {
 
 KstObject::UpdateType KstVCurve::update(int update_counter) {
-  if (KstObject::checkUpdateCounter(update_counter) || !VX || !VY) {
+  if (!VX || !VY || KstObject::checkUpdateCounter(update_counter))
     return NO_CHANGE;
-  }
 
   VX->update(update_counter);





More information about the Kst mailing list