[Kst] [Bug 103849] plots of equations don't update if only the range of a static vector they depend on is changed

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


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=103849         
staikos kde org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED



------- Additional Comments From staikos kde org  2005-04-14 04:22 -------
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