[Kst] kdeextragear-2/kst/kst

George Staikos staikos at kde.org
Tue Oct 21 03:18:56 CEST 2003


CVS commit by staikos: 

Don't leave invalid vectors in the list to be updated from.

CCMAIL: 66303-done at bugs.kde.org


  M +6 -2      kstquickcurvesdialog_i.cpp   1.24


--- kdeextragear-2/kst/kst/kstquickcurvesdialog_i.cpp  #1.23:1.24
@@ -246,4 +246,6 @@ bool KstQuickCurvesDialogI::apply(bool a
   if (x_is_new) {
     if (!vx->isValid()) {
+      KST::vectorList.remove(vx.data());
+      KST::vectorList.remove(vy.data());
       KMessageBox::sorry(0L, i18n("The requested X vector is not in the file."));
       return false;
@@ -252,4 +254,6 @@ bool KstQuickCurvesDialogI::apply(bool a
   if (y_is_new) {
     if (!vy->isValid()) {
+      KST::vectorList.remove(vx.data());
+      KST::vectorList.remove(vy.data());
       KMessageBox::sorry(0L, i18n("The requested Y vector is not in the file."));
       return false;
@@ -288,8 +292,8 @@ bool KstQuickCurvesDialogI::addPlot() {
   KstPlot *plot = KST::plotList.addPlot(QString::null, PlotCols->value());
   PlotList->insertItem(plot->tagName());
-  PlotList->setCurrentItem(PlotList->count()-1);
+  PlotList->setCurrentItem(PlotList->count() - 1);
 
   if (!apply(true)) {
-    PlotList->removeItem(PlotList->count()-1);
+    PlotList->removeItem(PlotList->count() - 1);
     KST::plotList.remove(plot);
     return false;




More information about the Kst mailing list