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:
|
||||
self.ctrl.yGridCheck.setChecked(y)
|
||||
if alpha is not None:
|
||||
v = fn.clip_scalar(alpha, 0., 1.)*self.ctrl.gridAlphaSlider.maximum()
|
||||
self.ctrl.gridAlphaSlider.setValue(v)
|
||||
v = fn.clip_scalar(alpha, 0, 1) * self.ctrl.gridAlphaSlider.maximum() # slider range 0 to 255
|
||||
self.ctrl.gridAlphaSlider.setValue( int(v) )
|
||||
|
||||
def close(self):
|
||||
## Most of this crap is needed to avoid PySide trouble.
|
||||
|
Loading…
Reference in New Issue
Block a user