corrected PolyLineROI.setPen() to modify individual segments as well.

This commit is contained in:
Luke Campagnola 2014-01-04 01:03:58 -05:00
parent 95dd56bdb6
commit eda59be46d
2 changed files with 6 additions and 1 deletions

View File

@ -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

View File

@ -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):
"""