From ca283660dea898a2b35adcaebc21bfd62c85417d Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Wed, 6 Apr 2022 17:11:15 -0400 Subject: [PATCH] Fix bug where if `yrange` was passed the mxmin callback was still used.. --- piker/ui/_interaction.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/piker/ui/_interaction.py b/piker/ui/_interaction.py index 6a833b1f..f76bac00 100644 --- a/piker/ui/_interaction.py +++ b/piker/ui/_interaction.py @@ -798,9 +798,14 @@ class ChartView(ViewBox): if set_range: - yrange = self._maxmin() - if yrange is None: - return + if not yrange: + # XXX: only compute the mxmn range + # if none is provided as input! + yrange = self._maxmin() + + if yrange is None: + log.warning(f'No yrange provided for {self.name}!?') + return ylow, yhigh = yrange