Bugfix #270: Create path for Symmetric picking error so it can be drawn

The function shape() will generate the missing path without side effects.
This commit is contained in:
Darius Arnold 2019-03-22 10:42:16 +01:00
parent 81c7ac2f6e
commit af43d247c6

View File

@ -2810,6 +2810,11 @@ class MainWindow(QMainWindow):
spe_l = pg.PlotDataItem([mpp - spe, mpp - spe], ylims, pen=pen, spe_l = pg.PlotDataItem([mpp - spe, mpp - spe], ylims, pen=pen,
name='{}-SPE'.format(phase)) name='{}-SPE'.format(phase))
spe_r = pg.PlotDataItem([mpp + spe, mpp + spe], ylims, pen=pen) spe_r = pg.PlotDataItem([mpp + spe, mpp + spe], ylims, pen=pen)
# Ugly fix: spe_l/r.curve.path is initialized to None and can't be accessed, causing the
# Warning: drawPicks: Could not create fill for symmetric pick error
# this generates them
spe_l.curve.shape()
spe_r.curve.shape()
try: try:
color = pen.color() color = pen.color()
color.setAlpha(100.) color.setAlpha(100.)