From a07367fae297f5b970db84d8de7a43d1393d0f5c Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Wed, 7 Sep 2022 10:18:52 -0400 Subject: [PATCH] Fix div-by-zero split sizing bug --- piker/ui/_chart.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/piker/ui/_chart.py b/piker/ui/_chart.py index f919f396..d932c49c 100644 --- a/piker/ui/_chart.py +++ b/piker/ui/_chart.py @@ -416,18 +416,12 @@ class LinkedSplits(QWidget): '''Set the proportion of space allocated for linked subcharts. ''' - ln = len(self.subplots) + ln = len(self.subplots) or 1 # proportion allocated to consumer subcharts if not prop: prop = 3/8*5/8 - # if ln < 2: - # prop = 3/8*5/8 - - # elif ln >= 2: - # prop = 3/8 - h = self.height() histview_h = h * 5/16 h = h - histview_h