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.
This commit is contained in:
WarmUpTill
2023-03-05 01:49:03 +01:00
committed by WarmUpTill
parent be23065988
commit 143020dc27

View File

@@ -1,6 +1,7 @@
#include "duration-control.hpp"
#include "utility.hpp"
#include "mouse-wheel-guard.hpp"
#include "obs-module.h"
#include "utility.hpp"
#include <sstream>
#include <iomanip>
@@ -125,6 +126,7 @@ DurationSelection::DurationSelection(QWidget *parent, bool showUnitSelection,
{
_duration->setMinimum(minValue);
_duration->setMaximum(86400); // 24 hours
PreventMouseWheelAdjustWithoutFocus(_duration);
populateUnits(_unitSelection);