[Kst] branches/work/kst/portto4/kst/src/libkstapp

Mike Fenton mike at staikos.net
Tue Nov 27 22:07:48 CET 2007


SVN commit 742337 by fenton:

FIXME cleanup.
Update Tag creation for Scalars.


 M  +0 -2      equationdialog.cpp  
 M  +2 -3      scalardialog.cpp  


--- branches/work/kst/portto4/kst/src/libkstapp/equationdialog.cpp #742336:742337
@@ -226,10 +226,8 @@
   equation->update(0);
   equation->unlock();
 
-  //FIXME assume new plot for now...
   //FIXME this should be a command...
   //FIXME need some smart placement...
-  //FIXME need to hook up placement...
 
   CurvePtr curve = _document->objectStore()->createObject<Curve>(suggestCurveName(equation->tag(), true));
   Q_ASSERT(curve);
--- branches/work/kst/portto4/kst/src/libkstapp/scalardialog.cpp #742336:742337
@@ -90,8 +90,7 @@
 ObjectPtr ScalarDialog::createNewDataObject() const {
   bool ok = false;
 
-  //FIXME We don't have a 'suggestScalarName' like we do with vectors... eli?
-  QString tagString = DataDialog::tagString();
+  const ObjectTag tag = _document->objectStore()->suggestObjectTag<Scalar>(tagString());
 
   Q_ASSERT(_document && _document->objectStore());
 
@@ -109,7 +108,7 @@
 //            << "\n\tvalue:" << value
 //            << endl;
 
-  ScalarPtr scalar = _document->objectStore()->createObject<Scalar>(ObjectTag::fromString(tagString));
+  ScalarPtr scalar = _document->objectStore()->createObject<Scalar>(tag);
   scalar->setValue(value);
   scalar->setOrphan(true);
   scalar->setEditable(true);


More information about the Kst mailing list