mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-04-23 02:27:29 -05:00
Do not apply MouseWheelWidgetAdjustmentGuard to QScrollBars
Without this change, it will be annoying to interact with expanded QComboBoxes and there should be no danger of accidentally modifying macro settings by interacting with QScrollBars
This commit is contained in:
parent
99c9b1a4a2
commit
d3e8b76fa6
|
|
@ -5,6 +5,7 @@
|
|||
#include <obs.hpp>
|
||||
#include <QEvent>
|
||||
#include <QLabel>
|
||||
#include <QScrollBar>
|
||||
|
||||
bool MacroSegment::Save(obs_data_t *obj)
|
||||
{
|
||||
|
|
@ -136,6 +137,11 @@ void MacroSegmentEdit::SetFocusPolicyOfWidgets()
|
|||
QList<QWidget *> widgets = this->findChildren<QWidget *>();
|
||||
for (auto w : widgets) {
|
||||
w->setFocusPolicy(Qt::StrongFocus);
|
||||
// Ignore QScrollBar as there is no danger of accidentally modifying anything
|
||||
// and long expanded QComboBox would be difficult to interact with otherwise.
|
||||
if (qobject_cast<QScrollBar *>(w)) {
|
||||
continue;
|
||||
}
|
||||
w->installEventFilter(new MouseWheelWidgetAdjustmentGuard(w));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user