[Kst] extragear/graphics/kst/kst

George Staikos staikos at kde.org
Thu Dec 22 06:48:25 CET 2005


SVN commit 490492 by staikos:

don't create data objects with invalid names (in use).
I think we need to push this into the base class and have it auto-correct.  this
is going to be a big problem from KstScript I predict


 M  +5 -1      kstvcurve.cpp  


--- trunk/extragear/graphics/kst/kst/kstvcurve.cpp #490491:490492
@@ -805,7 +805,11 @@
   KstVectorPtr EXMinus = *_inputVectors.find(EXMINUSVECTOR);
   KstVectorPtr EYMinus = *_inputVectors.find(EYMINUSVECTOR);
 
-  KstVCurvePtr vcurve = new KstVCurve(tagName() + "'", VX, VY, EX, EY, EXMinus, EYMinus, Color);
+  QString name(tagName() + '\'');
+  while (KST::dataTagNameNotUnique(name, false)) {
+    name += '\'';
+  }
+  KstVCurvePtr vcurve = new KstVCurve(name, VX, VY, EX, EY, EXMinus, EYMinus, Color);
   // copy some other properties as well
   vcurve->setHasPoints(HasPoints);
   vcurve->setHasLines(HasLines);


More information about the Kst mailing list