corrected PolyLineROI.setPen() to modify individual segments as well.
This commit is contained in:
parent
95dd56bdb6
commit
eda59be46d
@ -37,6 +37,7 @@ pyqtgraph-0.9.9 [unreleased]
|
||||
- fixed unicode usage in AxisItem tick strings
|
||||
- fixed PlotCurveItem generating exceptions when data has length=0
|
||||
- fixed ImageView.setImage only working once
|
||||
- PolyLineROI.setPen() now changes the pen of its segments as well
|
||||
|
||||
|
||||
pyqtgraph-0.9.8 2013-11-24
|
||||
|
@ -1623,9 +1623,9 @@ class PolyLineROI(ROI):
|
||||
if pos is None:
|
||||
pos = [0,0]
|
||||
|
||||
ROI.__init__(self, pos, size=[1,1], **args)
|
||||
self.closed = closed
|
||||
self.segments = []
|
||||
ROI.__init__(self, pos, size=[1,1], **args)
|
||||
|
||||
for p in positions:
|
||||
self.addFreeHandle(p)
|
||||
@ -1750,6 +1750,10 @@ class PolyLineROI(ROI):
|
||||
shape[axes[1]] = sliced.shape[axes[1]]
|
||||
return sliced * mask.reshape(shape)
|
||||
|
||||
def setPen(self, *args, **kwds):
|
||||
ROI.setPen(self, *args, **kwds)
|
||||
for seg in self.segments:
|
||||
seg.setPen(*args, **kwds)
|
||||
|
||||
class LineSegmentROI(ROI):
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user