[Kst] branches/work/kst/portto4/kst/src/libkstapp
Peter Kümmel
syntheticpp at gmx.net
Thu May 27 17:42:45 CEST 2010
SVN commit 1131193 by kuemmel:
Init min/max variables before searching for the min/max values.
CCBUG: 236678
M +4 -3 plotitem.cpp
--- branches/work/kst/portto4/kst/src/libkstapp/plotitem.cpp #1131192:1131193
@@ -2587,7 +2587,8 @@
void PlotItem::computeBorder(Qt::Orientation orientation, qreal &minimum, qreal &maximum) const {
QRectF rect;
foreach (PlotRenderItem *renderer, renderItems()) {
- qreal min, max;
+ qreal min = maximum;
+ qreal max = minimum;
renderer->computeBorder(orientation, &min, &max);
minimum = qMin(min, minimum);
maximum = qMax(max, maximum);
@@ -4231,8 +4232,8 @@
void ZoomYLocalMaximumCommand::applyZoomTo(PlotItem *item, bool applyX, bool applyY) {
Q_UNUSED(applyX);
if (applyY) {
- qreal minimum = item->yAxis()->axisLog() ? 0.0 : -0.1;
- qreal maximum = 0.1;
+ qreal minimum = item->yMax();
+ qreal maximum = item->yMin();
item->computedRelationalMax(minimum, maximum);
item->computeBorder(Qt::Vertical, minimum, maximum);
More information about the Kst
mailing list