[Kst] kdeextragear-2/kst/kst

George Staikos staikos at kde.org
Tue Sep 21 17:42:56 CEST 2004


CVS commit by staikos: 

save orphan state for scalars


  M +8 -5      kstscalar.cpp   1.27


--- kdeextragear-2/kst/kst/kstscalar.cpp  #1.26:1.27
@@ -62,4 +62,6 @@ KstScalar::KstScalar(QDomElement& e) : K
       if (e.tagName() == "tag") {
         setTagName(e.text());
+      } else if (e.tagName() == "orphan") {
+        _orphan = true;
       } else if (e.tagName() == "value") {
         setValue(e.text().toDouble());
@@ -68,10 +70,8 @@ KstScalar::KstScalar(QDomElement& e) : K
     n = n.nextSibling();
 
-    if (tagName().toDouble(&ok)==value()) {
-      if (ok) {
+    if (tagName().toDouble(&ok) == value() && ok) {
         _displayable = false;
       }
     }
-  }
   KST::scalarList.append(this);
 }
@@ -90,4 +90,7 @@ KstObject::UpdateType KstScalar::update(
 void KstScalar::save(QTextStream &ts) {
   ts << "    <tag>" << QStyleSheet::escape(tagName()) << "</tag>" << endl;
+  if (_orphan) {
+    ts << "    <orphan/>" << endl;
+  }
   ts << "    <value>" << value() << "</value>" << endl;
 }





More information about the Kst mailing list