From 21273d6f7f28d073a91cf5a4baa11743aa50219b Mon Sep 17 00:00:00 2001 From: ldam <ldam@passcal.nmt.edu> Date: Wed, 3 May 2023 10:01:55 -0600 Subject: [PATCH] plotting_widget.py fix bug when zooming inside gap where there's no data --- .../view/plotting/plotting_widget/plotting_widget.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sohstationviewer/view/plotting/plotting_widget/plotting_widget.py b/sohstationviewer/view/plotting/plotting_widget/plotting_widget.py index 296fc32bb..6c3fd6eb8 100755 --- a/sohstationviewer/view/plotting/plotting_widget/plotting_widget.py +++ b/sohstationviewer/view/plotting/plotting_widget/plotting_widget.py @@ -575,6 +575,8 @@ class PlottingWidget(QtWidgets.QScrollArea): tr_min_ys = [] tr_max_ys = [] for x, y in zip(ax.x_list, ax.y_list): + if len(x) == 0: + continue if self.min_x > x[-1] or self.max_x < x[0]: continue ret = get_total_miny_maxy(x, y, self.min_x, self.max_x) -- GitLab