[Kst] branches/work/kst/portto4/kst/src

Barth Netterfield netterfield at astro.utoronto.ca
Tue Sep 20 12:42:15 UTC 2011


SVN commit 1254584 by netterfield:

BUG:
Fix crash creating csds in new tabs
Fix sticky defaults for generated vectors
Fix log mode autorange for images



 M  +3 -0      libkst/generatedvector.cpp  
 M  +3 -0      libkstapp/csddialog.cpp  
 M  +2 -2      libkstmath/image.cpp  
 M  +1 -0      widgets/dialogdefaults.cpp  
 M  +6 -0      widgets/matrixselector.cpp  


--- branches/work/kst/portto4/kst/src/libkst/generatedvector.cpp #1254583:1254584
@@ -70,6 +70,9 @@
     _v[i] = x0 + double(i) * (x1 - x0) / double(n - 1);
   }
 
+  _min = x0;
+  _max = x1;
+
   _scalars["min"]->setValue(x0);
   _scalars["max"]->setValue(x1);
 
--- branches/work/kst/portto4/kst/src/libkstapp/csddialog.cpp #1254583:1254584
@@ -248,6 +248,9 @@
           plotItem = static_cast<PlotItem*>(_CSDTab->curvePlacement()->existingPlot());
           break;
       }
+      case CurvePlacement::NewPlotNewTab:
+          _document->createView();
+          // fall through to case NewPlot.
       case CurvePlacement::NewPlot:
       {
           CreatePlotForCurve *cmd = new CreatePlotForCurve();
--- branches/work/kst/portto4/kst/src/libkstmath/image.cpp #1254583:1254584
@@ -108,8 +108,8 @@
     _ns_minx = MinX;
     _ns_maxy = MaxY;
     _ns_miny = MinY;
-    MinPosY = MinY > 0 ? MinY : 0;
-    MinPosX = MinX > 0 ? MinX : 0;
+    MinPosY = MinY > 0 ? MinY : yStepSize*0.5;
+    MinPosX = MinX > 0 ? MinX : xStepSize*0.5;
 
 
     //recalculate the thresholds if necessary
--- branches/work/kst/portto4/kst/src/widgets/dialogdefaults.cpp #1254583:1254584
@@ -27,6 +27,7 @@
   _dialogDefaults->setValue("genVector/min", V->min());
   _dialogDefaults->setValue("genVector/max", V->max()); 
   _dialogDefaults->setValue("genVector/length", V->length());
+  qDebug() << "set gen vector defaults:" << V->min() << V->max();
 }
 
 void setDataMatrixDefaults(DataMatrixPtr M) {
--- branches/work/kst/portto4/kst/src/widgets/matrixselector.cpp #1254583:1254584
@@ -95,11 +95,17 @@
 
 
 void MatrixSelector::editMatrix() {
+
+  if (selectedMatrix()->provider()) {
+    DialogLauncher::self()->showObjectDialog(selectedMatrix()->provider());
+  } else {
   QString matrixName;
   DialogLauncher::self()->showMatrixDialog(matrixName, ObjectPtr(selectedMatrix()), true);
 }
 
+}
 
+
 void MatrixSelector::clearSelection() {
   _matrix->setCurrentIndex(-1);
 }


More information about the Kst mailing list