bugfixes for ArrowItem __init__

This commit is contained in:
Luke Campagnola 2012-05-31 16:07:23 -04:00
parent 29be68d7fe
commit 0e1b57cf01

View File

@ -13,6 +13,10 @@ class ArrowItem(QtGui.QGraphicsPathItem):
def __init__(self, **opts): def __init__(self, **opts):
QtGui.QGraphicsPathItem.__init__(self, opts.get('parent', None)) QtGui.QGraphicsPathItem.__init__(self, opts.get('parent', None))
if 'size' in opts:
opts['headLen'] = opts['size']
if 'width' in opts:
opts['headWidth'] = opts['width']
defOpts = { defOpts = {
'pxMode': True, 'pxMode': True,
'angle': -150, ## If the angle is 0, the arrow points left 'angle': -150, ## If the angle is 0, the arrow points left