From f818a270543f7b87ddb31238d31b80ff4b9255be Mon Sep 17 00:00:00 2001 From: "Eugeniy E. Mikhailov" Date: Tue, 22 Jun 2021 16:57:03 -0400 Subject: do not draw scan position if we have no points to show --- eitControl.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/eitControl.py b/eitControl.py index 1b4ed95..c8e7850 100644 --- a/eitControl.py +++ b/eitControl.py @@ -313,7 +313,8 @@ class Experiment: self.channelGraph[name]=self.dataPlot.plot(x,y, pen=None, symbol='o', symbolPen=None, symbolBrush=color, symbolSize=5, name=name) else: self.channelGraph[name].setData(x,y) - self.vLineSweepPosition.setValue(x[-1]) + if len(x)>0: + self.vLineSweepPosition.setValue(x[-1]) # centralFreqFormatted = pg.siFormat(self.fCent, suffix='Hz', precision=4) # showing trailing zeros is tricky fCent = self.rfGenFunc.getCenter() -- cgit v1.2.3