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

Method PopulateMacroElseActions

lib/macro/macro-edit.cpp:432–455  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

430}
431
432void MacroEdit::PopulateMacroElseActions(Macro &m, uint32_t afterIdx)
433{
434 auto &actions = m.ElseActions();
435 ui->elseActionsList->SetHelpMsgVisible(actions.size() == 0);
436
437 if (ui->elseActionsList->PopulateWidgetsFromCache(&m)) {
438 return;
439 }
440
441 // The layout system has not completed geometry propagation yet, so we
442 // can skip those checks for now
443 ui->elseActionsList->SetVisibilityCheckEnable(false);
444
445 for (; afterIdx < actions.size(); afterIdx++) {
446 auto newEntry = new MacroActionEdit(this, &actions[afterIdx]);
447 ui->elseActionsList->Add(newEntry);
448 }
449
450 // Give the layout system time before enabling the visibility checks and
451 // fully constructing the visible macro segments
452 QTimer::singleShot(0, this, [this]() {
453 ui->elseActionsList->SetVisibilityCheckEnable(true);
454 });
455}
456
457void MacroEdit::PopulateMacroConditions(Macro &m, uint32_t afterIdx)
458{

Callers

nothing calls this directly

Calls 5

SetHelpMsgVisibleMethod · 0.80
sizeMethod · 0.80
AddMethod · 0.45

Tested by

no test coverage detected