Skip to content

Commit

Permalink
Update header info of action queue macro segments
Browse files Browse the repository at this point in the history
  • Loading branch information
WarmUpTill committed Feb 19, 2024
1 parent bffc628 commit 2bd6daa
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/macro/macro-action-queue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,8 @@ void MacroActionQueueEdit::QueueChanged(const QString &text)

auto lock = LockContext();
_entryData->_queue = GetWeakActionQueueByQString(text);
emit HeaderInfoChanged(
QString::fromStdString(_entryData->GetShortDesc()));
}

void MacroActionQueueEdit::ActionChanged(int value)
Expand Down
7 changes: 7 additions & 0 deletions lib/macro/macro-condition-queue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,11 @@ bool MacroConditionQueue::Load(obs_data_t *obj)
return true;
}

std::string MacroConditionQueue::GetShortDesc() const
{
return GetActionQueueName(_queue);
}

static inline void populateQueueTypeSelection(QComboBox *list)
{
for (const auto &[_, name] : conditionTypes) {
Expand Down Expand Up @@ -102,6 +107,8 @@ void MacroConditionQueueEdit::ConditionChanged(int condition)
auto lock = LockContext();
_entryData->_condition =
static_cast<MacroConditionQueue::Condition>(condition);
emit HeaderInfoChanged(
QString::fromStdString(_entryData->GetShortDesc()));
SetWidgetVisibility();
}

Expand Down
1 change: 1 addition & 0 deletions lib/macro/macro-condition-queue.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ class MacroConditionQueue : public MacroCondition {
bool CheckCondition();
bool Save(obs_data_t *obj) const;
bool Load(obs_data_t *obj);
std::string GetShortDesc() const;
std::string GetId() const { return id; };
static std::shared_ptr<MacroCondition> Create(Macro *m)
{
Expand Down

0 comments on commit 2bd6daa

Please sign in to comment.