| 627 | } |
| 628 | |
| 629 | void TempVariableSelection::HighlightSelection(const TempVariableRef &var) |
| 630 | { |
| 631 | const auto segment = var._segment.lock(); |
| 632 | if (!segment) { |
| 633 | return; |
| 634 | } |
| 635 | |
| 636 | const auto macro = segment->GetMacro(); |
| 637 | if (!macro) { |
| 638 | return; |
| 639 | } |
| 640 | |
| 641 | const MacroEdit *macroEdit = getMacroEditFromMacro(_macroEdits, macro); |
| 642 | if (!macroEdit) { |
| 643 | return; |
| 644 | } |
| 645 | |
| 646 | const auto color = GetThemeTypeName() == "Dark" ? Qt::white : Qt::blue; |
| 647 | |
| 648 | auto type = var.GetType(); |
| 649 | switch (type) { |
| 650 | case TempVariableRef::SegmentType::NONE: |
| 651 | return; |
| 652 | case TempVariableRef::SegmentType::CONDITION: |
| 653 | macroEdit->HighlightCondition(var.GetIdx(), color); |
| 654 | return; |
| 655 | case TempVariableRef::SegmentType::ACTION: |
| 656 | macroEdit->HighlightAction(var.GetIdx(), color); |
| 657 | return; |
| 658 | case TempVariableRef::SegmentType::ELSEACTION: |
| 659 | macroEdit->HighlightElseAction(var.GetIdx(), color); |
| 660 | return; |
| 661 | default: |
| 662 | break; |
| 663 | } |
| 664 | } |
| 665 | |
| 666 | QString TempVariableSelection::SetupInfoLabel() |
| 667 | { |
nothing calls this directly
no test coverage detected