Don't try to show xhair if no active plot
parent
307afb1935
commit
212882a5a5
|
@ -172,6 +172,7 @@ class ChartSpace(QtGui.QWidget):
|
||||||
|
|
||||||
# XXX: pretty sure we don't need this
|
# XXX: pretty sure we don't need this
|
||||||
# remove any existing plots?
|
# remove any existing plots?
|
||||||
|
# XXX: ahh we might want to support cache unloading..
|
||||||
# self.vbox.removeWidget(self.linkedcharts)
|
# self.vbox.removeWidget(self.linkedcharts)
|
||||||
|
|
||||||
# switching to a new viewable chart
|
# switching to a new viewable chart
|
||||||
|
|
|
@ -435,7 +435,12 @@ class Cursor(pg.GraphicsObject):
|
||||||
self,
|
self,
|
||||||
y_label_level: float = None,
|
y_label_level: float = None,
|
||||||
) -> None:
|
) -> None:
|
||||||
g = self.graphics[self.active_plot]
|
|
||||||
|
plot = self.active_plot
|
||||||
|
if not plot:
|
||||||
|
return
|
||||||
|
|
||||||
|
g = self.graphics[plot]
|
||||||
# show horiz line and y-label
|
# show horiz line and y-label
|
||||||
g['hl'].show()
|
g['hl'].show()
|
||||||
g['vl'].show()
|
g['vl'].show()
|
||||||
|
|
Loading…
Reference in New Issue