From 11f8c4f350664528dbe3113eccc9f71c0bbd6114 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Sun, 6 Mar 2022 17:16:07 -0500 Subject: [PATCH] Add detailed `.addItem()`` comment --- piker/ui/_chart.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/piker/ui/_chart.py b/piker/ui/_chart.py index 3fcaae07..9ae98418 100644 --- a/piker/ui/_chart.py +++ b/piker/ui/_chart.py @@ -1046,7 +1046,17 @@ class ChartPlotWidget(pg.PlotWidget): # (we need something that avoids clutter on x-axis). self._add_sticky(name, bg_color=color) + # NOTE: this is more or less the RENDER call that tells Qt to + # start showing the generated graphics-curves. This is kind of + # of edge-triggered call where once added any + # ``QGraphicsItem.update()`` calls are automatically displayed. + # Our internal graphics objects have their own "update from + # data" style method API that allows for real-time updates on + # the next render cycle; just note a lot of the real-time + # updates are implicit and require a bit of digging to + # understand. pi.addItem(curve) + return curve, data_key # TODO: make this a ctx mngr