File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -136,6 +136,7 @@ class MainWindow : public QMainWindow {
136136 void resetQmlTerminal ();
137137 void closeEvent (QCloseEvent *event);
138138 void autosetHrange ();
139+ void autosetVrange ();
139140 QIcon invertIconLightness (const QIcon &icon, QSize size);
140141
141142 void on_pushButtonRecordMeasurementsXXX_clicked (int n);
Original file line number Diff line number Diff line change 1616#include " mainwindow.h"
1717
1818void MainWindow::on_pushButtonAutoset_clicked () {
19+ autosetVrange ();
20+ autosetVrange (); // Run twice, because the div size updates after first run
21+ autosetHrange ();
22+ }
23+
24+ void MainWindow::autosetVrange () {
1925 QVector<int > activeAnalogs, activeLogic;
2026 for (int i = 0 ; i < ANALOG_COUNT + MATH_COUNT ; i++)
21- if (ui->plot ->isChUsed (i) && ui->plot ->isChVisible (i))
27+ if (ui->plot ->isChUsed (i) && ui->plot ->isChVisible (i)) {
2228 activeAnalogs.append (i);
29+ } else {
30+ ui->plot ->setChOffset (i, 0 );
31+ }
2332 for (int i = 0 ; i < LOGIC_GROUPS ; i++)
2433 if (ui->plot ->getLogicBitsUsed (i) > 0 )
2534 activeLogic.append (i);
@@ -132,8 +141,6 @@ void MainWindow::on_pushButtonAutoset_clicked() {
132141 }
133142 on_comboBoxSelectedChannel_currentIndexChanged (
134143 ui->comboBoxSelectedChannel ->currentIndex ());
135-
136- autosetHrange ();
137144}
138145
139146void MainWindow::autosetHrange () {
@@ -146,7 +153,7 @@ void MainWindow::autosetHrange() {
146153 } else {
147154 // Pevný režim
148155 on_pushButtonModeFull_clicked ();
149- ui->dialZoom ->setValue (ui->dialZoom ->maximum ()); // Zoom žádný
156+ ui->dialZoom ->setValue (ui->dialZoom ->maximum ()); // Zoom žádný
150157 }
151158}
152159
You can’t perform that action at this time.
0 commit comments