Merge pull request #1309 from ibrewster/polylineroifix

Properly retain and use hoverPen argument in _PolyLineSegment
This commit is contained in:
Kenneth Lyons 2020-07-13 21:28:06 -07:00 committed by GitHub
commit d70e870a44
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2003,7 +2003,8 @@ class PolyLineROI(ROI):
self.setPoints(state['points'], closed=state['closed'])
def addSegment(self, h1, h2, index=None):
seg = _PolyLineSegment(handles=(h1, h2), pen=self.pen, parent=self, movable=False)
seg = _PolyLineSegment(handles=(h1, h2), pen=self.pen, hoverPen=self.hoverPen,
parent=self, movable=False)
if index is None:
self.segments.append(seg)
else:
@ -2244,7 +2245,7 @@ class _PolyLineSegment(LineSegmentROI):
def _makePen(self):
if self.mouseHovering or self._parentHovering:
return fn.mkPen(255, 255, 0)
return self.hoverPen
else:
return self.pen