MCPcopy Create free account
hub / github.com/WarmUpTill/SceneSwitcher / MacroSelectionChanged

Method MacroSelectionChanged

lib/macro/macro-tab.cpp:506–543  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

504}
505
506void AdvSceneSwitcher::MacroSelectionChanged()
507{
508 if (loading) {
509 return;
510 }
511
512 auto macro = GetSelectedMacro();
513 if (!macro) {
514 SetMacroEditAreaDisabled(true);
515 ui->macroEdit->SetMacro(macro);
516 return;
517 }
518
519 {
520 const QSignalBlocker b1(ui->macroName);
521 const QSignalBlocker b2(ui->runMacroInParallel);
522 const QSignalBlocker b3(ui->actionTriggerMode);
523 ui->macroName->setText(macro->Name().c_str());
524 ui->runMacroInParallel->setChecked(macro->RunInParallel());
525 ui->actionTriggerMode->setCurrentIndex(
526 ui->actionTriggerMode->findData(static_cast<int>(
527 macro->GetActionTriggerMode())));
528 }
529
530 macro->ResetUIHelpers();
531 ui->macroEdit->SetMacro(macro);
532 SetMacroEditAreaDisabled(false);
533
534 if (macro->IsGroup()) {
535 SetMacroEditAreaDisabled(true);
536 ui->macroName->setEnabled(true);
537 return;
538 }
539
540 if (GetGlobalMacroSettings()._saveSettingsOnMacroChange) {
541 obs_frontend_save();
542 }
543}
544
545void AdvSceneSwitcher::HighlightOnChange() const
546{

Callers

nothing calls this directly

Calls 9

setTextMethod · 0.80
setCheckedMethod · 0.80
RunInParallelMethod · 0.80
GetActionTriggerModeMethod · 0.80
ResetUIHelpersMethod · 0.80
IsGroupMethod · 0.80
SetMacroMethod · 0.45
c_strMethod · 0.45
NameMethod · 0.45

Tested by

no test coverage detected