[Kst] kst_hfi_calib_branch: kdeextragear-2/kst/kst

George Staikos staikos at kde.org
Wed Nov 10 14:25:43 CET 2004


CVS commit by staikos: 

more updating fixes for the new scheme.  I'm not sure this is entirely reliable
yet.  I wish we had a good regression suite for this.  hfi_stable tag is
not pushed up against this.


  M +9 -5      ksthistogram.cpp   1.35.2.1
  M +2 -5      kstplugin.cpp   1.78.2.2


--- kdeextragear-2/kst/kst/ksthistogram.cpp  #1.35:1.35.2.1
@@ -26,4 +26,5 @@
 #include <qstylesheet.h>
 
+#include <kdebug.h>
 #include <kglobal.h>
 #include <klocale.h>
@@ -146,13 +147,16 @@ KstHistogram::~KstHistogram() {
 
 KstObject::UpdateType KstHistogram::update(int update_counter) {
-  int i_bin, i_pt, ns;
+  int i_bin, i_pt;
   double y=0;
-  double MaxY;
 
-  if (KstObject::checkUpdateCounter(update_counter))
+  if (KstObject::checkUpdateCounter(update_counter)) {
     return NO_CHANGE;
+  }
 
   if (update_counter > 0) {
     V->update(update_counter);
+    if (V->numNew() == 0) {
+      return NO_CHANGE;
+    }
   }
 
@@ -173,5 +177,5 @@ KstObject::UpdateType KstHistogram::upda
   }
 
-  ns = V->sampleCount();
+  int ns = V->sampleCount();
   for (i_pt = 0; i_pt < ns ; i_pt++) {
     y = V->interpolate(i_pt, ns);
@@ -182,5 +186,5 @@ KstObject::UpdateType KstHistogram::upda
   }
 
-  MaxY = 0;
+  double MaxY = 0.0;
 
   for (i_bin=0; i_bin<NBins; i_bin++) {

--- kdeextragear-2/kst/kst/kstplugin.cpp  #1.78.2.1:1.78.2.2
@@ -226,9 +226,5 @@ void KstPlugin::freeParameters() {
 
 KstObject::UpdateType KstPlugin::update(int update_counter) {
-  if (!isValid()) {
-    return NO_CHANGE;
-  }
-
-  if (KstObject::checkUpdateCounter(update_counter)) {
+  if (!isValid() || KstObject::checkUpdateCounter(update_counter)) {
     return NO_CHANGE;
   }
@@ -237,4 +233,5 @@ KstObject::UpdateType KstPlugin::update(
     bool cont = false;
     for (KstVectorMap::Iterator i = _inputVectors.begin(); i != _inputVectors.end(); ++i) {
+      i.data()->update(update_counter);
       if (i.data()->numNew() > 0) {
         cont = true;





More information about the Kst mailing list