From 143020dc270acdc057424269b4b017e806db1d0b Mon Sep 17 00:00:00 2001 From: WarmUpTill Date: Sun, 5 Mar 2023 01:49:03 +0100 Subject: [PATCH] Prevent accidental duration changes while scrolling through settings This was especially problematic with the "cooldown" option of the "Match behavior" settings on the General tab as accidental changes here could lead to macros not being executed unexpectedly, which is very hard to diagnose without inspecting logs. --- src/utils/duration-control.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/utils/duration-control.cpp b/src/utils/duration-control.cpp index 43926602..acb2e2cc 100644 --- a/src/utils/duration-control.cpp +++ b/src/utils/duration-control.cpp @@ -1,6 +1,7 @@ #include "duration-control.hpp" -#include "utility.hpp" +#include "mouse-wheel-guard.hpp" #include "obs-module.h" +#include "utility.hpp" #include #include @@ -125,6 +126,7 @@ DurationSelection::DurationSelection(QWidget *parent, bool showUnitSelection, { _duration->setMinimum(minValue); _duration->setMaximum(86400); // 24 hours + PreventMouseWheelAdjustWithoutFocus(_duration); populateUnits(_unitSelection);