From 875a8dc935b489a081b7d8d35275dff2441ff23b Mon Sep 17 00:00:00 2001 From: Adrian Kierzkowski Date: Tue, 8 Aug 2023 01:25:08 +0200 Subject: [PATCH] Fixes #363, refs #365. Splitted HorizontalDock::timebaseChanged event handler from doing operations on dsoControl and dsoWidget in the same callback. Now there two callback and each uses the Widget it operates on. Signed-off-by: Adrian Kierzkowski --- openhantek/src/mainwindow.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/openhantek/src/mainwindow.cpp b/openhantek/src/mainwindow.cpp index 452687f2..cdc1472d 100644 --- a/openhantek/src/mainwindow.cpp +++ b/openhantek/src/mainwindow.cpp @@ -286,8 +286,9 @@ MainWindow::MainWindow( HantekDsoControl *dsoControl, DsoSettings *settings, Exp connect( horizontalDock, &HorizontalDock::timebaseChanged, triggerDock, &TriggerDock::timebaseChanged ); connect( horizontalDock, &HorizontalDock::timebaseChanged, dsoControl, [ dsoControl, this ]() { dsoControl->setRecordTime( dsoSettings->scope.horizontal.timebase * DIVS_TIME ); - this->dsoWidget->updateTimebase( dsoSettings->scope.horizontal.timebase ); } ); + connect( horizontalDock, &HorizontalDock::timebaseChanged, this->dsoWidget, + [ this ]() { dsoWidget->updateTimebase( dsoSettings->scope.horizontal.timebase ); } ); connect( spectrumDock, &SpectrumDock::frequencybaseChanged, this, [ this ]( double frequencybase ) { this->dsoWidget->updateFrequencybase( frequencybase ); } ); connect( dsoControl, &HantekDsoControl::samplerateChanged, horizontalDock,