Skip to content

Commit

Permalink
Fixes OpenHantek#363, refs OpenHantek#365. Splitted HorizontalDock::t…
Browse files Browse the repository at this point in the history
…imebaseChanged 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.
  • Loading branch information
nseam committed Aug 7, 2023
1 parent 50bbaac commit 4612a8a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion openhantek/src/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 4612a8a

Please sign in to comment.