From 4606f80a9d7fa8adc77309ab9eaabda968fc7e5e Mon Sep 17 00:00:00 2001 From: WarmUpTill <19472752+WarmUpTill@users.noreply.github.com> Date: Thu, 6 Nov 2025 21:25:02 +0100 Subject: [PATCH] Enable filtering in "Hotkey" action --- plugins/base/macro-action-hotkey.cpp | 8 ++++---- plugins/base/macro-action-hotkey.hpp | 22 ++++++++++------------ 2 files changed, 14 insertions(+), 16 deletions(-) diff --git a/plugins/base/macro-action-hotkey.cpp b/plugins/base/macro-action-hotkey.cpp index 4894e4f5..6b573d83 100644 --- a/plugins/base/macro-action-hotkey.cpp +++ b/plugins/base/macro-action-hotkey.cpp @@ -601,10 +601,10 @@ static void populateHotkeyNames(QComboBox *list, MacroActionHotkeyEdit::MacroActionHotkeyEdit( QWidget *parent, std::shared_ptr entryData) : QWidget(parent), - _actionType(new QComboBox()), - _hotkeyType(new QComboBox()), - _obsHotkeys(new QComboBox()), - _keys(new QComboBox()), + _actionType(new FilterComboBox()), + _hotkeyType(new FilterComboBox()), + _obsHotkeys(new FilterComboBox()), + _keys(new FilterComboBox()), _leftShift(new QCheckBox( obs_module_text("AdvSceneSwitcher.action.hotkey.leftShift"))), _rightShift(new QCheckBox(obs_module_text( diff --git a/plugins/base/macro-action-hotkey.hpp b/plugins/base/macro-action-hotkey.hpp index a03afef6..8e8d65c2 100644 --- a/plugins/base/macro-action-hotkey.hpp +++ b/plugins/base/macro-action-hotkey.hpp @@ -85,11 +85,14 @@ private slots: void DurationChanged(const Duration &); void OnlySendToOBSChanged(int state); -protected: - QComboBox *_actionType; - QComboBox *_hotkeyType; - QComboBox *_obsHotkeys; - QComboBox *_keys; +private: + void RepopulateOBSHotkeySelection(); + void SetWidgetVisibility(); + + FilterComboBox *_actionType; + FilterComboBox *_hotkeyType; + FilterComboBox *_obsHotkeys; + FilterComboBox *_keys; QCheckBox *_leftShift; QCheckBox *_rightShift; QCheckBox *_leftCtrl; @@ -101,15 +104,10 @@ protected: DurationSelection *_duration; QCheckBox *_onlySendToOBS; QLabel *_noKeyPressSimulationWarning; - - std::shared_ptr _entryData; - -private: - void RepopulateOBSHotkeySelection(); - void SetWidgetVisibility(); - QHBoxLayout *_entryLayout; QHBoxLayout *_keyConfigLayout; + + std::shared_ptr _entryData; bool _loading = true; };