| 385 | } |
| 386 | |
| 387 | void CMainFrame::ProcessLines(const Lines& lines) |
| 388 | { |
| 389 | if (lines.empty()) |
| 390 | return; |
| 391 | |
| 392 | // design decision: filtering is done on the UI thread, see CLogView::Add |
| 393 | // changing this would introduces extra thread and thus complexity. Do that only if it solves a problem. |
| 394 | |
| 395 | int views = GetViewCount(); |
| 396 | for (int i = 0; i < views; ++i) |
| 397 | GetView(i).BeginUpdate(); |
| 398 | |
| 399 | for (auto& line : lines) |
| 400 | AddMessage(Message(line.time, line.systemTime, line.pid, line.processName, line.message)); |
| 401 | |
| 402 | for (int i = 0; i < views; ++i) |
| 403 | { |
| 404 | if (GetView(i).EndUpdate() && GetTabCtrl().GetCurSel() != i) |
| 405 | { |
| 406 | SetModifiedMark(i, true); |
| 407 | GetTabCtrl().UpdateLayout(); |
| 408 | GetTabCtrl().Invalidate(); |
| 409 | } |
| 410 | } |
| 411 | } |
| 412 | |
| 413 | bool CMainFrame::OnUpdate() |
| 414 | { |
nothing calls this directly
no test coverage detected