@ -42,6 +42,7 @@ class Conductor(QtWidgets.QGraphicsItem):
def__init__(self,parentView):
super().__init__()
self.setFlag(QtWidgets.QGraphicsItem.ItemHasNoContents,True)#only child items. Without this we get notImplementedError: QGraphicsItem.paint() is abstract and must be overridden
self.parentView=parentView
self.totalHeight=71
@ -50,8 +51,6 @@ class Conductor(QtWidgets.QGraphicsItem):
self.staticBlocks=None#Cached Block Data list
self.staticMeta=None#Cached track meta data dict.
self.setFlag(QtWidgets.QGraphicsItem.ItemHasNoContents,True)#only child items. Without this we get notImplementedError: QGraphicsItem.paint() is abstract and must be overridden
@ -433,6 +432,9 @@ class TempoPoint(QtWidgets.QGraphicsItem):
self.setZValue(0)#avoid hovering conflict with block handle
self.ungrabMouse=api.nothing#to surpress a warning from the context menu
#Set this flag after setFlags above
self.setFlag(QtWidgets.QGraphicsItem.ItemHasNoContents,True)#only child items. Without this we get notImplementedError: QGraphicsItem.paint() is abstract and must be overridden
self.note=QtWidgets.QGraphicsTextItem("")
self.note.setParentItem(self)
self.note.setFont(constantsAndConfigs.musicFont)
@ -457,14 +459,10 @@ class TempoPoint(QtWidgets.QGraphicsItem):
self.wheelEventChangedValue=0#resetted in hoverEnterEvent. But we still need it for new items that appear directly under the mouse cursor
defpaint(self,painter,options,widget=None):
#painter.drawRect(self.boundingRect()) #uncomment to show the bounding rect
pass
defboundingRect(self):
"""We could return self.childrenBoundingRect() but we want the clickable area to be bigger"""
returnQtCore.QRectF(0,0,25,50)#x, y, w, h
defmouseMoveEvent(self,event):
ifself.staticExportItem["positionInBlock"]==0:
#First in block can't be moved
@ -570,15 +568,13 @@ class TimeLine(QtWidgets.QGraphicsItem):
def__init__(self,parent):
super().__init__()
self.setFlag(QtWidgets.QGraphicsItem.ItemHasNoContents,True)#only child items. Without this we get notImplementedError: QGraphicsItem.paint() is abstract and must be overridden