| 714 | } |
| 715 | |
| 716 | void ChildFrame::RedrawDgBlock(const detail::Dg4Block &dg4, const wxTreeItemId &root) { |
| 717 | std::ostringstream label; |
| 718 | label << dg4.BlockType(); |
| 719 | const std::string desc = dg4.Description(); |
| 720 | |
| 721 | if (!desc.empty()) { |
| 722 | label << " (" << desc << ")"; |
| 723 | } else if (dg4.Cg4().size() == 1) { |
| 724 | std::ostringstream sub; |
| 725 | const auto* cg4 = dg4.Cg4().front().get(); |
| 726 | if (cg4 != nullptr) { |
| 727 | sub << cg4->Name(); |
| 728 | sub << " Samples: " << cg4->NofSamples(); |
| 729 | label << " (" << sub.str() << ")"; |
| 730 | } |
| 731 | |
| 732 | // If the DG only have one CG, use the CG Name instead |
| 733 | |
| 734 | } |
| 735 | auto root_dg = left_->AppendItem(root, label.str(), TREE_DG, TREE_DG, |
| 736 | new BlockAddress(dg4.FilePosition())); |
| 737 | RedrawDataList(dg4,root_dg); |
| 738 | RedrawCgList(dg4, root_dg); |
| 739 | |
| 740 | } |
| 741 | |
| 742 | void ChildFrame::RedrawDgBlock(const detail::Dg3Block &dg3, const wxTreeItemId &root) { |
| 743 | auto root_dg = left_->AppendItem(root, CreateBlockText(dg3), |
nothing calls this directly
no test coverage detected