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

Mike Fenton mike at staikos.net
Fri Jul 10 20:43:05 CEST 2009


SVN commit 994570 by fenton:

Apply origin plot zoom before applying SharedAxisBox zoom for zooms that may change non-shared axis.


 M  +14 -1     sharedaxisboxitem.cpp  


--- branches/work/kst/portto4/kst/src/libkstapp/sharedaxisboxitem.cpp #994569:994570
@@ -395,7 +395,7 @@
     }
   }
   foreach (PlotItem* plotItem, allPlots) {
-    if ((applyX && applyY) && ((_shareX && _shareY) || (isXTiedZoom() && isYTiedZoom()) || (plotItem == originPlotItem))) {
+    if ((applyX && applyY) && ((_shareX && _shareY) || (isXTiedZoom() && isYTiedZoom()))) {
       plotItem->zoomFixedExpression(projection, true);
     } else if (applyX && (_shareX || isXTiedZoom() || (plotItem == originPlotItem))) {
       plotItem->zoomFixedExpression(QRectF(projection.x(), plotItem->projectionRect().y(), projection.width(), plotItem->projectionRect().height()), true);
@@ -412,6 +412,7 @@
 #endif
   _xAxisZoomMode = PlotAxis::FixedExpression;
   _yAxisZoomMode = PlotAxis::FixedExpression;
+  originPlotItem->zoomFixedExpression(projection, true);
   applyZoom(projection, originPlotItem);
 }
 
@@ -468,6 +469,7 @@
 #endif
   _xAxisZoomMode = PlotAxis::Auto;
   _yAxisZoomMode = PlotAxis::AutoBorder;
+  originPlotItem->zoomMaximum(true);
   applyZoom(computeRect(PlotAxis::Auto, PlotAxis::AutoBorder), originPlotItem);
 }
 
@@ -478,6 +480,7 @@
 #endif
   _xAxisZoomMode = PlotAxis::Auto;
   _yAxisZoomMode = PlotAxis::SpikeInsensitive;
+  originPlotItem->zoomMaxSpikeInsensitive(true);
   applyZoom(computeRect(PlotAxis::Auto, PlotAxis::SpikeInsensitive), originPlotItem);
 }
 
@@ -487,6 +490,7 @@
   qDebug() << "zoomYMeanCentered" << endl;
 #endif
   _yAxisZoomMode = PlotAxis::MeanCentered;
+  originPlotItem->zoomYMeanCentered(true);
   applyZoom(computeRect(PlotAxis::Auto, PlotAxis::MeanCentered), originPlotItem, false, true);
 }
 
@@ -496,6 +500,7 @@
   qDebug() << "zoomXMaximum" << endl;
 #endif
   _xAxisZoomMode = PlotAxis::Auto;
+  originPlotItem->zoomXMaximum(true);
   applyZoom(computeRect(PlotAxis::Auto, PlotAxis::Auto), originPlotItem, true, false);
 }
 
@@ -505,6 +510,7 @@
   qDebug() << "zoomXNoSpike" << endl;
 #endif
   _xAxisZoomMode = PlotAxis::SpikeInsensitive;
+  originPlotItem->zoomXNoSpike(true);
   applyZoom(computeRect(PlotAxis::SpikeInsensitive, PlotAxis::Auto), originPlotItem, true, false);
 }
 
@@ -514,6 +520,7 @@
   qDebug() << "zoomXAutoBorder" << endl;
 #endif
   _xAxisZoomMode = PlotAxis::AutoBorder;
+  originPlotItem->zoomXAutoBorder(true);
   applyZoom(computeRect(PlotAxis::AutoBorder, PlotAxis::Auto), originPlotItem, true, false);
 }
 
@@ -654,6 +661,7 @@
       }
     }
     _xAxisZoomMode = PlotAxis::FixedExpression;
+    originPlotItem->zoomNormalizeXtoY(true);
     applyZoom(computedRect, originPlotItem, true, false);
   }
 }
@@ -718,6 +726,7 @@
       }
     }
     _yAxisZoomMode = PlotAxis::FixedExpression;
+    originPlotItem->zoomYLocalMaximum(true);
     applyZoom(computedRect, originPlotItem, false, true);
   }
 }
@@ -728,6 +737,7 @@
   qDebug() << "zoomYMaximum" << endl;
 #endif
   _yAxisZoomMode = PlotAxis::Auto;
+  originPlotItem->zoomYMaximum(true);
   applyZoom(computeRect(PlotAxis::Auto, PlotAxis::Auto), originPlotItem, false, true);
 }
 
@@ -737,6 +747,7 @@
   qDebug() << "zoomYNoSpike" << endl;
 #endif
   _yAxisZoomMode = PlotAxis::SpikeInsensitive;
+  originPlotItem->zoomYNoSpike(true);
   applyZoom(computeRect(PlotAxis::Auto, PlotAxis::SpikeInsensitive), originPlotItem, false, true);
 }
 
@@ -746,6 +757,7 @@
   qDebug() << "zoomYAutoBorder" << endl;
 #endif
   _yAxisZoomMode = PlotAxis::AutoBorder;
+  originPlotItem->zoomYAutoBorder(true);
   applyZoom(computeRect(PlotAxis::Auto, PlotAxis::AutoBorder), originPlotItem, false, true);
 }
 
@@ -884,6 +896,7 @@
     computedRect.setBottom(mean + (range / 2.0));
 
     _yAxisZoomMode = PlotAxis::FixedExpression;
+    originPlotItem->zoomNormalizeYtoX(true);
     applyZoom(computedRect, originPlotItem, false, true);
   }
 }


More information about the Kst mailing list