[Kst] branches/kst/1.3/kst/src/libkstmath

Adam Treat treat at kde.org
Mon Oct 16 23:19:51 CEST 2006


SVN commit 596199 by treat:

*Backport of 596190.


 M  +3 -0      kstdataobject.cpp  
 M  +1 -0      kstdataobject.h  
 M  +11 -4     kstplugin.cpp  


--- branches/kst/1.3/kst/src/libkstmath/kstdataobject.cpp #596198:596199
@@ -36,12 +36,14 @@
 KstDataObject::KstDataObject() : KstObject() {
   //kstdDebug() << "+++ CREATING DATA OBJECT: " << (void*)this << endl;
   _curveHints = new KstCurveHintList;
+  _isInputLoaded = false;
 }
 
 KstDataObject::KstDataObject(const QDomElement& e) : KstObject() {
   Q_UNUSED(e)
   //kstdDebug() << "+++ CREATING DATA OBJECT: " << (void*)this << endl;
   _curveHints = new KstCurveHintList;
+  _isInputLoaded = false;
 }
 
 
@@ -159,6 +161,7 @@
   
   setDirty();
 
+  _isInputLoaded = true;
   return rc;
 }
 
--- branches/kst/1.3/kst/src/libkstmath/kstdataobject.h #596198:596199
@@ -112,6 +112,7 @@
 
     QString _typeString, _type;
 
+    bool _isInputLoaded;
     QValueList<QPair<QString,QString> > _inputVectorLoadQueue;
     QValueList<QPair<QString,QString> > _inputScalarLoadQueue;
     QValueList<QPair<QString,QString> > _inputStringLoadQueue;
--- branches/kst/1.3/kst/src/libkstmath/kstplugin.cpp #596198:596199
@@ -505,10 +505,17 @@
 
 
 bool KstPlugin::isValid() const {
-  return _inputVectors.count() == _inArrayCnt &&
-         _inputScalars.count() == _inScalarCnt - _inPid &&
-         _inputStrings.count() == _inStringCnt &&
-         _plugin.data() != 0L;
+  if (_isInputLoaded) {
+    return _inputVectors.count() == _inArrayCnt &&
+           _inputScalars.count() == _inScalarCnt - _inPid &&
+           _inputStrings.count() == _inStringCnt &&
+           _plugin.data() != 0L;
+  } else {
+    return _inputVectorLoadQueue.count() == _inArrayCnt &&
+           _inputScalarLoadQueue.count() == _inScalarCnt - _inPid &&
+           _inputStringLoadQueue.count() == _inStringCnt &&
+           _plugin.data() != 0L;
+  }
 }
 
 


More information about the Kst mailing list