[Kst] kdeextragear-2/kst/kst

Andrew Walker arwalker at sumusltd.com
Mon Aug 30 22:58:39 CEST 2004


CVS commit by arwalker: 

Cleanup.


  M +36 -30    kstcurvedialog_i.cpp   1.65


--- kdeextragear-2/kst/kst/kstcurvedialog_i.cpp  #1.64:1.65
@@ -254,4 +254,6 @@ bool KstCurveDialogI::new_I() {
 
 bool KstCurveDialogI::edit_I() {
+  bool rc = false;
+
   DP->writeLock();
 
@@ -259,25 +261,24 @@ bool KstCurveDialogI::edit_I() {
   if (_tagName->text() != DP->tagName() && KST::dataTagNameNotUnique(_tagName->text())) {
     _tagName->setFocus();
-    DP->writeUnlock();
-    return false;
-  }
-
+  } else {
   DP->setTagName(_tagName->text());
 
   { // leave this scope here to destroy the iterator
     KstReadLocker ml(&KST::vectorList.lock());
-    KstVectorList::Iterator i = KST::vectorList.findTag(_xVector->selectedVector());
-    if (i != KST::vectorList.end())
-      DP->setXVector(*i);
+      KstVectorList::Iterator it = KST::vectorList.findTag(_xVector->selectedVector());
+      if (it != KST::vectorList.end()) {
+        DP->setXVector(*it);
+      }
 
-    i = KST::vectorList.findTag(_yVector->selectedVector());
-    if (i != KST::vectorList.end())
-      DP->setYVector(*i);
+      it = KST::vectorList.findTag(_yVector->selectedVector());
+      if (it != KST::vectorList.end()) {
+        DP->setYVector(*it);
+      }
 
-    i = KST::vectorList.findTag(_xError->selectedVector());
-    DP->setXError(*i);
+      it = KST::vectorList.findTag(_xError->selectedVector());
+      DP->setXError(*it);
 
-    i = KST::vectorList.findTag(_yError->selectedVector());
-    DP->setYError(*i);
+      it = KST::vectorList.findTag(_yError->selectedVector());
+      DP->setYError(*it);
   }
 
@@ -291,9 +292,14 @@ bool KstCurveDialogI::edit_I() {
   DP->update(-1);
 
+    rc = true;
+  }
+  
   DP->writeUnlock();
 
+  if (rc) {
   emit modified();
+  }
 
-  return true;
+  return rc;
 }
 





More information about the Kst mailing list