Skip to content

Commit 27ad9b0

Browse files
committed
fix(dashboard): mark every widget dirty on live tick
onLiveTick was only calling markDirty() when the widget carried a Sensor or Tag property. That left stuck-on-first-render any widget bound through another mechanism: - StatusWidget / IconCardWidget with 'Threshold' = MonitorTag (no Tag/Sensor), used throughout the demo - MultiStatusWidget (uses a 'Sensors' cell array, not the scalar Sensor / Tag base properties) - ChipBarWidget (per-chip StatusFcn closures) - Any widget driven by ValueFcn / DataFcn / StatusFcn Those widgets rendered once with their first value and then stayed frozen because: Dirty flag is cleared to false at the end of every tick (line 1015). The guarded markDirty on the next tick never re-fired for them. So the 'if w.Dirty && ...' gate at line 967 was never satisfied. Mark every widget dirty every tick; the widget-local refresh() still decides whether anything actually needs redrawing. Trivial widgets (text, divider, image) absorb the call as cheap no-ops. Regression suite: 80/80 green (one run flaked on the known Octave test_toolbar segfault; re-ran clean).
1 parent d240bb8 commit 27ad9b0

1 file changed

Lines changed: 10 additions & 3 deletions

File tree

libs/Dashboard/DashboardEngine.m

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -954,9 +954,16 @@ function onLiveTick(obj)
954954
% (PostSet listeners on Sensor.X/Y do not fire reliably in Octave for indexed assignment)
955955
for i = 1:numel(ws)
956956
w = ws{i};
957-
if ~isempty(w.Sensor) || ~isempty(w.Tag)
958-
w.markDirty();
959-
end
957+
% Mark every widget dirty on every live tick. The previous
958+
% guard (`~isempty(w.Sensor) || ~isempty(w.Tag)`) skipped
959+
% Threshold-bound widgets (MonitorTag-backed StatusWidget /
960+
% IconCardWidget), Sensors-plural MultiStatusWidget,
961+
% ChipBarWidget (per-chip StatusFcn), and any widget using
962+
% StatusFcn / ValueFcn / DataFcn — so their dots / labels
963+
% never moved once the initial render was done. Tick
964+
% everything; the widget-local refresh() decides whether
965+
% anything actually needs redrawing.
966+
w.markDirty();
960967
% Dead-handle recovery: panel was destroyed (e.g. by a layout bug or
961968
% figure-close race). Drop Realized so the next scroll-realize pass
962969
% can rebuild it, and skip this tick.

0 commit comments

Comments
 (0)