Redraw the existing panel in-place from current memory state. Uses spring_layout (~100ms, no subprocess). Called every ~4s during live capture. No-op if the panel is not open.
()
| 177 | |
| 178 | |
| 179 | def refresh_live() -> None: |
| 180 | """Redraw the existing panel in-place from current memory state. |
| 181 | |
| 182 | Uses spring_layout (~100ms, no subprocess). Called every ~4s during live capture. |
| 183 | No-op if the panel is not open. |
| 184 | """ |
| 185 | if _ax is None or _canvas_widget is None: |
| 186 | return |
| 187 | filt = _filter_var.get() if _filter_var is not None else "All" |
| 188 | nf = _node_filter_var.get() if _node_filter_var is not None else "" |
| 189 | G, pos, node_colors, edge_colors = _build_graph_data(live=True, filter_option=filt, node_filter=nf) |
| 190 | if G is None: |
| 191 | return |
| 192 | _draw_on_axes(_ax, G, pos, node_colors, edge_colors) |
| 193 | _figure.subplots_adjust(left=0.02, right=0.98, top=0.98, bottom=0.02) |
| 194 | _canvas_widget.draw() |
| 195 | log.debug("refresh_live: %d nodes", len(G.nodes)) |
| 196 | |
| 197 | |
| 198 | def _apply_panel_filter(*_) -> None: |
nothing calls this directly
no test coverage detected