@@ -745,6 +745,17 @@ void AdvSceneSwitcher::ShowMacroContextMenu(const QPoint &pos)
745745 remove->setDisabled (ui->macros ->SelectionEmpty ());
746746 menu.addSeparator ();
747747
748+ auto pause = menu.addAction (
749+ obs_module_text (" AdvSceneSwitcher.macroTab.pause" ), this ,
750+ &AdvSceneSwitcher::PauseSelectedMacros);
751+ pause->setDisabled (ui->macros ->SelectionEmpty ());
752+
753+ auto unpause = menu.addAction (
754+ obs_module_text (" AdvSceneSwitcher.macroTab.unpause" ), this ,
755+ &AdvSceneSwitcher::UnpauseSelectedMacros);
756+ unpause->setDisabled (ui->macros ->SelectionEmpty ());
757+ menu.addSeparator ();
758+
748759 auto group = menu.addAction (
749760 obs_module_text (" AdvSceneSwitcher.macroTab.group" ), ui->macros ,
750761 &MacroTree::GroupSelectedItems);
@@ -805,6 +816,48 @@ void AdvSceneSwitcher::CopyMacro()
805816 MacroSignalManager::Instance ()->Add (QString::fromStdString (name));
806817}
807818
819+ void AdvSceneSwitcher::PauseSelectedMacros ()
820+ {
821+ auto selectedMacros = GetSelectedMacros ();
822+ if (selectedMacros.empty ()) {
823+ return ;
824+ }
825+
826+ auto lock = LockContext ();
827+ for (const auto ¯o : selectedMacros) {
828+ if (macro->IsGroup ()) {
829+ for (const auto &subitem :
830+ GetGroupMacroEntries (macro.get ())) {
831+ subitem->SetPaused (true );
832+ }
833+ } else {
834+ macro->SetPaused (true );
835+ }
836+ }
837+ ui->macros ->UpdateRunningStates ();
838+ }
839+
840+ void AdvSceneSwitcher::UnpauseSelectedMacros ()
841+ {
842+ auto selectedMacros = GetSelectedMacros ();
843+ if (selectedMacros.empty ()) {
844+ return ;
845+ }
846+
847+ auto lock = LockContext ();
848+ for (const auto ¯o : selectedMacros) {
849+ if (macro->IsGroup ()) {
850+ for (const auto &subitem :
851+ GetGroupMacroEntries (macro.get ())) {
852+ subitem->SetPaused (false );
853+ }
854+ } else {
855+ macro->SetPaused (false );
856+ }
857+ }
858+ ui->macros ->UpdateRunningStates ();
859+ }
860+
808861bool MacroTabIsInFocus ()
809862{
810863 return AdvSceneSwitcher::window &&
0 commit comments