libtools/ToolText.py:onMouseEvent(): only set self.textPos on is{Left,Right}Down.

This commit is contained in:
Lucio Andrés Illanes Albornoz 2019-09-08 17:02:41 +02:00
parent a628ed6471
commit d410ef9321

View File

@ -33,8 +33,9 @@ class ToolText(Tool):
# #
# onMouseEvent(self, event, atPoint, brushColours, brushSize, isDragging, isLeftDown, isRightDown, dispatchFn, eventDc): XXX # onMouseEvent(self, event, atPoint, brushColours, brushSize, isDragging, isLeftDown, isRightDown, dispatchFn, eventDc): XXX
def onMouseEvent(self, event, atPoint, brushColours, brushSize, isDragging, isLeftDown, isRightDown, dispatchFn, eventDc): def onMouseEvent(self, event, atPoint, brushColours, brushSize, isDragging, isLeftDown, isRightDown, dispatchFn, eventDc):
if isLeftDown or isRightDown:
self.textPos = list(atPoint) self.textPos = list(atPoint)
dispatchFn(eventDc, True, [*self.textPos, *brushColours, 0, "_"]) dispatchFn(eventDc, True, [*atPoint, *brushColours, 0, "_"])
# __init__(self, *args): initialisation method # __init__(self, *args): initialisation method
def __init__(self, *args): def __init__(self, *args):