[bugfix] error when there is nothing to plot
This commit is contained in:
parent
0320ad67b9
commit
36a4f0df8a
3
PyLoT.py
3
PyLoT.py
@ -1903,8 +1903,9 @@ class MainWindow(QMainWindow):
|
||||
self.plot_method = 'fast'
|
||||
else:
|
||||
self.plot_method = 'normal'
|
||||
plots, gaps = plotWidget.plotWFData(wfdata=wfst, wfsyn=wfsyn, title=title, mapping=False, component=comp,
|
||||
rval = plotWidget.plotWFData(wfdata=wfst, wfsyn=wfsyn, title=title, mapping=False, component=comp,
|
||||
nth_sample=int(nth_sample), method=self.plot_method)
|
||||
plots, gaps = rval if rval else ([], [])
|
||||
return plots, gaps
|
||||
|
||||
def adjustPlotHeight(self):
|
||||
|
@ -447,6 +447,10 @@ class WaveformWidgetPG(QtGui.QWidget):
|
||||
self.orig_parent = parent
|
||||
# attribute plotdict is a dictionary connecting position and a name
|
||||
self.plotdict = dict()
|
||||
# init labels
|
||||
self.xlabel = None
|
||||
self.ylabel = None
|
||||
self.title = None
|
||||
# create plot
|
||||
self.main_layout = QtGui.QVBoxLayout()
|
||||
self.label_layout = QtGui.QHBoxLayout()
|
||||
|
Loading…
Reference in New Issue
Block a user