[Kst] extragear/graphics/kst/src/libkstmath

George Staikos staikos at kde.org
Tue Sep 5 14:01:28 CEST 2006


SVN commit 581128 by staikos:

I think this fixes the equation assertion failures.  Please verify.


 M  +6 -0      kstequation.cpp  


--- trunk/extragear/graphics/kst/src/libkstmath/kstequation.cpp #581127:581128
@@ -268,6 +268,9 @@
   setDirty();
   _equation = in_fn;
   VectorsUsed.clear();
+  for (KstScalarMap::Iterator i = _inputScalars.begin(); i != _inputScalars.end(); ++i) {
+    (*i)->unlock();
+  }
   _inputScalars.clear();
   _ns = 2; // reset the updating
   delete _pe;
@@ -286,6 +289,9 @@
       Equation::FoldVisitor vis(&ctx, &_pe);
       KstStringMap sm;
       _pe->collectObjects(VectorsUsed, _inputScalars, sm);
+      for (KstScalarMap::Iterator i = _inputScalars.begin(); i != _inputScalars.end(); ++i) {
+        (*i)->readLock();
+      }
       _pe->update(-1, &ctx);
     } else {
       // Parse error


More information about the Kst mailing list