From dfff6bcfd674b605e0b5282be1a5d35b994876a4 Mon Sep 17 00:00:00 2001 From: jp9000 Date: Fri, 28 May 2021 11:29:58 -0700 Subject: [PATCH] UI: Fix OBS signal recursion SourceSyncChanged() would call syncOffsetChanged() because it's connected to the widget. This is fixed by blocking signals This bug was discovered because undo/redo actions for sync offset changes were triggering the creation of new undo/redo actions within their own callbacks. Fixes obsproject/obs-studio#4760 --- UI/adv-audio-control.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/UI/adv-audio-control.cpp b/UI/adv-audio-control.cpp index 8c64c313b..843596184 100644 --- a/UI/adv-audio-control.cpp +++ b/UI/adv-audio-control.cpp @@ -377,7 +377,9 @@ void OBSAdvAudioCtrl::SourceVolumeChanged(float value) void OBSAdvAudioCtrl::SourceSyncChanged(int64_t offset) { + syncOffset->blockSignals(true); syncOffset->setValue(offset / NSEC_PER_MSEC); + syncOffset->blockSignals(false); } void OBSAdvAudioCtrl::SourceMixersChanged(uint32_t mixers)