Bugfixes:
- workaround for PySide exit crash - fixed alpha of major/minor grid lines
This commit is contained in:
parent
73e94f543c
commit
6d01aa2b09
@ -559,7 +559,7 @@ class AxisItem(GraphicsWidget):
|
||||
|
||||
lineAlpha = 255 / (i+1)
|
||||
if self.grid is not False:
|
||||
lineAlpha = self.grid
|
||||
lineAlpha *= self.grid/255. * np.clip((0.05 * lengthInPixels / (len(ticks)+1)), 0., 1.)
|
||||
|
||||
for v in ticks:
|
||||
## determine actual position to draw this tick
|
||||
|
@ -116,7 +116,7 @@ class Ui_Form(object):
|
||||
self.gridLayout_2.addWidget(self.yGridCheck, 1, 0, 1, 2)
|
||||
self.gridAlphaSlider = QtGui.QSlider(self.gridGroup)
|
||||
self.gridAlphaSlider.setMaximum(255)
|
||||
self.gridAlphaSlider.setProperty("value", 70)
|
||||
self.gridAlphaSlider.setProperty("value", 128)
|
||||
self.gridAlphaSlider.setOrientation(QtCore.Qt.Horizontal)
|
||||
self.gridAlphaSlider.setObjectName(_fromUtf8("gridAlphaSlider"))
|
||||
self.gridLayout_2.addWidget(self.gridAlphaSlider, 2, 1, 1, 1)
|
||||
|
@ -221,7 +221,7 @@
|
||||
<number>255</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>70</number>
|
||||
<number>128</number>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
|
@ -104,6 +104,11 @@ class GraphicsView(QtGui.QGraphicsView):
|
||||
self.sceneObj = GraphicsScene()
|
||||
self.setScene(self.sceneObj)
|
||||
|
||||
## Workaround for PySide crash
|
||||
## This ensures that the scene will outlive the view.
|
||||
if pyqtgraph.Qt.USE_PYSIDE:
|
||||
self.sceneObj._view_ref_workaround = self
|
||||
|
||||
## by default we set up a central widget with a grid layout.
|
||||
## this can be replaced if needed.
|
||||
self.centralWidget = None
|
||||
|
Loading…
Reference in New Issue
Block a user