[Kst] kdeextragear-2/kst/kst

George Staikos staikos at kde.org
Mon Mar 28 05:16:46 CEST 2005


CVS commit by staikos: 

fix a race in the update hack


  M +11 -2     kstdoc.cpp   1.158


--- kdeextragear-2/kst/kst/kstdoc.cpp  #1.157:1.158
@@ -861,6 +861,15 @@ bool KstDoc::event(QEvent *e) {
               for (Kst2DPlotList::Iterator i = pl.begin(); i != pl.end(); ++i) {
                 for (QValueList<KstBaseCurve*>::ConstIterator j = te->_curves.begin(); j != te->_curves.end(); ++j) {
-                  if ((*i)->Curves.contains(*j)) {
+                  // race: if ((*i)->Curves.contains(*j)) {
+                  const KstBaseCurveList& cl = (*i)->Curves;
+                  bool doBreak = false;
+                  for (KstBaseCurveList::ConstIterator k = cl.begin(); k != cl.end(); ++k) {
+                    if (*j == *k) {
                     (*i)->setDirty();
+                      doBreak = true;
+                      break;
+                    }
+                  }
+                  if (doBreak) {
                     break;
                   }




More information about the Kst mailing list