| 405 | } |
| 406 | |
| 407 | void 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 | |
| 432 | void MacroEdit::PopulateMacroElseActions(Macro &m, uint32_t afterIdx) |
| 433 | { |
nothing calls this directly
no test coverage detected