Add `._last_bar_lines` guard to `.paint()`

incremental_update_paths
Tyler Goodlet 2022-05-21 11:45:44 -04:00
parent c256d3bdc0
commit b985b48eb3
1 changed files with 3 additions and 2 deletions

View File

@ -274,6 +274,7 @@ class BarItems(pg.GraphicsObject):
# lead to any perf gains other then when zoomed in to less bars
# in view.
p.setPen(self.last_bar_pen)
if self._last_bar_lines:
p.drawLines(*tuple(filter(bool, self._last_bar_lines)))
profiler('draw last bar')