# HG changeset patch # User Hasan Yavuz Ă–ZDERYA # Date 2015-07-23 23:16:47 # Node ID cb639cefd201e468002169a76c197ded9ad752ee # Parent 6d13d2fee0f9f133b611e6cd0cb759c5c3c8a2a6 unzoom when scales changed diff --git a/mainwindow.cpp b/mainwindow.cpp --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -489,6 +489,8 @@ void MainWindow::onAutoScaleChecked(bool ui->spYmin->setEnabled(true); ui->spYmax->setEnabled(true); + zoomer->zoom(0); // unzoom first, since zoomer plays with scales + ui->plot->setAxisScale(QwtPlot::yLeft, ui->spYmin->value(), ui->spYmax->value()); } @@ -498,6 +500,7 @@ void MainWindow::onYScaleChanged() { ui->plot->setAxisScale(QwtPlot::yLeft, ui->spYmin->value(), ui->spYmax->value()); + zoomer->zoom(0); // unzoom first, since zoomer plays with scales } void MainWindow::onNumberFormatButtonToggled(int numberFormatId, bool checked)