[Kst] kdeextragear-2/kst/kst

George Staikos staikos at kde.org
Thu Apr 14 04:22:25 CEST 2005


CVS commit by staikos: 

make s-vectors update properly - the base class assumes that nothing really
changed since the derived classes typically "update"
BUG: 103849


  M +19 -3     kstsvector.cpp   1.4
  M +1 -0      kstsvector.h   1.3


--- kdeextragear-2/kst/kst/kstsvector.cpp  #1.3:1.4
@@ -54,6 +54,6 @@ void KstSVector::save(QTextStream &ts, c
   ts << indent << "<svector>" << endl;
 
-  ts << indent << "  <tag>" << QStyleSheet::escape(tagName()) <<
-    "</tag>" << endl;
+  ts << indent << "  <tag>" << QStyleSheet::escape(tagName())
+    << "</tag>" << endl;
   ts << indent << "  <min>" << min() << "</min>" << endl;
   ts << indent << "  <max>" << max() << "</max>" << endl;
@@ -86,5 +86,20 @@ void KstSVector::changeRange(double x0, 
   _scalars["min"]->setValue(x0);
   _scalars["max"]->setValue(x1);
-  setDirty( true );
+  setDirty(true);
+}
+
+KstObject::UpdateType KstSVector::update(int update_counter) {
+  bool force = dirty();
+
+  if (KstObject::checkUpdateCounter(update_counter) && !force) {
+    return lastUpdateResult();
+  }
+
+  KstObject::UpdateType baseRC = KstVector::update(update_counter);
+  if (force) {
+    baseRC = UPDATE;
+  }
+
+  return baseRC;
 }
 

--- kdeextragear-2/kst/kst/kstsvector.h  #1.2:1.3
@@ -32,4 +32,5 @@ class KstSVector : public KstVector {
 
   void changeRange(double x0, double x1, int n);
+  virtual KstObject::UpdateType update(int update_counter);
 };
 




More information about the Kst mailing list