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

Method PopulateMacroActions

lib/macro/macro-edit.cpp:407–430  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

405}
406
407void MacroEdit::PopulateMacroActions(Macro &m, uint32_t afterIdx)
408{
409 auto &actions = m.Actions();
410 ui->actionsList->SetHelpMsgVisible(actions.size() == 0);
411
412 if (ui->actionsList->PopulateWidgetsFromCache(&m)) {
413 return;
414 }
415
416 // The layout system has not completed geometry propagation yet, so we
417 // can skip those checks for now
418 ui->actionsList->SetVisibilityCheckEnable(false);
419
420 for (; afterIdx < actions.size(); afterIdx++) {
421 auto newEntry = new MacroActionEdit(this, &actions[afterIdx]);
422 ui->actionsList->Add(newEntry);
423 }
424
425 // Give the layout system time before enabling the visibility checks and
426 // fully constructing the visible macro segments
427 QTimer::singleShot(0, this, [this]() {
428 ui->actionsList->SetVisibilityCheckEnable(true);
429 });
430}
431
432void MacroEdit::PopulateMacroElseActions(Macro &m, uint32_t afterIdx)
433{

Callers

nothing calls this directly

Calls 5

SetHelpMsgVisibleMethod · 0.80
sizeMethod · 0.80
AddMethod · 0.45

Tested by

no test coverage detected