MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / RedrawMdf4Blocks

Method RedrawMdf4Blocks

lib/mdflib/mdfviewer/src/childframe.cpp:268–293  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

266}
267
268void ChildFrame::RedrawMdf4Blocks(const mdf::detail::Mdf4File *file) {
269 if (file == nullptr) {
270 return;
271 }
272
273 auto root = left_->GetRootItem();
274
275 // File identity block
276 const auto& id = file->Id();
277 std::ostringstream id_string;
278 id_string << "ID (" << id.VersionString() << ")";
279 left_->AppendItem(root, wxString::FromUTF8(id_string.str()),
280 TREE_ID, TREE_ID, new BlockAddress(id.FilePosition()));
281
282 // Header block
283 const auto& hd = file->Hd();
284 const auto& hd_string = CreateBlockText(hd);
285 auto hd_root = left_->AppendItem(root, hd_string,
286 TREE_HD, TREE_HD, new BlockAddress(hd.FilePosition()));
287
288 RedrawHistory(hd, hd_root);
289 RedrawMeasurement(hd, hd_root);
290 RedrawHierarchy(hd,hd_root);
291 RedrawAttachment(hd, hd_root);
292 RedrawEvent(hd, hd_root);
293}
294
295void ChildFrame::Update() {
296 static bool recursive_lock = false;

Callers

nothing calls this directly

Calls 3

CreateBlockTextFunction · 0.85
VersionStringMethod · 0.80
FilePositionMethod · 0.45

Tested by

no test coverage detected