Infiniteline emits clicked signal event (#1522)
This commit is contained in:
parent
5bb3800adc
commit
961cdac51c
@ -25,12 +25,14 @@ class InfiniteLine(GraphicsObject):
|
||||
sigDragged(self)
|
||||
sigPositionChangeFinished(self)
|
||||
sigPositionChanged(self)
|
||||
sigclicked(self, ev)
|
||||
=============================== ===================================================
|
||||
"""
|
||||
|
||||
sigDragged = QtCore.Signal(object)
|
||||
sigPositionChangeFinished = QtCore.Signal(object)
|
||||
sigPositionChanged = QtCore.Signal(object)
|
||||
sigClicked = QtCore.Signal(object, object)
|
||||
|
||||
def __init__(self, pos=None, angle=90, pen=None, movable=False, bounds=None,
|
||||
hoverPen=None, label=None, labelOpts=None, span=(0, 1), markers=None,
|
||||
@ -400,6 +402,7 @@ class InfiniteLine(GraphicsObject):
|
||||
self.sigPositionChangeFinished.emit(self)
|
||||
|
||||
def mouseClickEvent(self, ev):
|
||||
self.sigClicked.emit(self, ev)
|
||||
if self.moving and ev.button() == QtCore.Qt.RightButton:
|
||||
ev.accept()
|
||||
self.setPos(self.startPosition)
|
||||
|
Loading…
Reference in New Issue
Block a user