Add option to hide entries from action selection

Intended to be used to hide legacy version of actions types (e.g. HTTP)
This commit is contained in:
WarmUpTill 2025-03-29 18:04:45 +01:00 committed by WarmUpTill
parent 78a5a2629d
commit 1b05019acc
2 changed files with 4 additions and 0 deletions

View File

@ -17,6 +17,9 @@ static inline void populateActionSelection(QComboBox *list)
QString entry(obs_module_text(action._name.c_str()));
if (list->findText(entry) == -1) {
list->addItem(entry);
qobject_cast<QListView *>(list->view())
->setRowHidden(list->count() - 1,
action._hidden);
} else {
blog(LOG_WARNING,
"did not insert duplicate action entry with name \"%s\"",

View File

@ -12,6 +12,7 @@ struct MacroActionInfo {
std::function<std::shared_ptr<MacroAction>(Macro *m)> _create = nullptr;
CreateActionWidget _createWidget = nullptr;
std::string _name;
bool _hidden = false;
};
class MacroActionFactory {