Sanitize input for plotItem.showGrid (was documentation fix for plotItem.showGrid alpha setting) (#1809)
* documentation fix for plotItem.showGrid alpha setting * revert to 0-1 scale
This commit is contained in:
parent
0da1958ff1
commit
39f705fd7f
@ -373,8 +373,8 @@ class PlotItem(GraphicsWidget):
|
|||||||
if y is not None:
|
if y is not None:
|
||||||
self.ctrl.yGridCheck.setChecked(y)
|
self.ctrl.yGridCheck.setChecked(y)
|
||||||
if alpha is not None:
|
if alpha is not None:
|
||||||
v = fn.clip_scalar(alpha, 0., 1.)*self.ctrl.gridAlphaSlider.maximum()
|
v = fn.clip_scalar(alpha, 0, 1) * self.ctrl.gridAlphaSlider.maximum() # slider range 0 to 255
|
||||||
self.ctrl.gridAlphaSlider.setValue(v)
|
self.ctrl.gridAlphaSlider.setValue( int(v) )
|
||||||
|
|
||||||
def close(self):
|
def close(self):
|
||||||
## Most of this crap is needed to avoid PySide trouble.
|
## Most of this crap is needed to avoid PySide trouble.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user