[Kst] extragear/graphics/kst/kst

Rick Chern rchern at interchange.ubc.ca
Fri Jul 15 20:26:56 CEST 2005


SVN commit 434885 by rchern:

Fix plot context menu for matrices and images

 M  +6 -6      kst2dplot.cpp  
 M  +1 -0      kstrmatrix.cpp  
 M  +2 -0      kstsmatrix.cpp  


--- trunk/extragear/graphics/kst/kst/kst2dplot.cpp #434884:434885
@@ -3582,15 +3582,15 @@
   // Repeat edit menu for images...
   for (i = n_curves; i < n_images + n_curves; i++) {
     const QString& tag = _images[i-n_curves]->tagName();
-    _imageEditMap[i] = tag;
-    submenu->insertItem(i18n("Type: Name", "Image: %1").arg(tag), i);
-    submenu->connectItem(i, this, SLOT(editImage(int)));
+    _imageEditMap[i+n_curves] = tag;
+    submenu->insertItem(i18n("Type: Name", "Image: %1").arg(tag), i+n_curves);
+    submenu->connectItem(i + n_curves, this, SLOT(editImage(int)));
     // get matrix for the image...
     KstMatrixPtr matrix = _images[i-n_curves]->matrix();
     if (matrix && matrix->editable()) {
-      _imageEditMap[i+n_images] = matrix->tagName();
-      submenu->insertItem(i18n("Type: Name", "Matrix: %1").arg(matrix->tagName()) , i + n_images);
-      submenu->connectItem(i + n_images, this, SLOT(editMatrix(int)));
+      _imageEditMap[i+n_images+n_curves] = matrix->tagName();
+      submenu->insertItem(i18n("Type: Name", "Matrix: %1").arg(matrix->tagName()) , i + n_images+n_curves);
+      submenu->connectItem(i + n_images+n_curves, this, SLOT(editMatrix(int)));
     }
     hasEntry = true;
   }
--- trunk/extragear/graphics/kst/kst/kstrmatrix.cpp #434884:434885
@@ -487,6 +487,7 @@
   _skip = skip;
   
   _saveable = true;
+  _editable = true;
   
   if (!_file) {
     KstDebug::self()->log(i18n("Data file for matrix %1 was not opened.").arg(tagName()), KstDebug::Warning);
--- trunk/extragear/graphics/kst/kst/kstsmatrix.cpp #434884:434885
@@ -56,6 +56,7 @@
   }
 
   _saveable = true;
+  _editable = true;
   _zSize = 0;
   change(in_tag, in_nX, in_nY, in_xMin, in_yMin, in_xStep, in_yStep, in_gradZMin, in_gradZMax, in_xDirection);
 }
@@ -63,6 +64,7 @@
 KstSMatrix::KstSMatrix(const QString& tag, uint nX, uint nY, double minX, double minY, double stepX, double stepY,
                        double gradZMin, double gradZMax, bool xDirection) : KstMatrix() {
   _saveable = true;
+  _editable = true;
   _zSize = 0;
   change(tag, nX, nY, minX, minY, stepX, stepY, gradZMin, gradZMax, xDirection);
 }


More information about the Kst mailing list