Browse Source

Fix Track-Group PositionHandle

master
Nils 2 years ago
parent
commit
459d25628e
  1. 5
      qtgui/songeditor.py

5
qtgui/songeditor.py

@ -1375,6 +1375,9 @@ class GroupLabel(QtWidgets.QGraphicsRectItem):
role = QtGui.QPalette.Text
self.arrowLabel.setBrush(self.parentGroupLabel.parentScene.parentView.parentMainWindow.fPalBlue.color(role))
#self.setFlag(QtWidgets.QGraphicsItem.ItemIsMovable, bool) #!!! Prevents double click to hide.
#self.setFlag(QtWidgets.QGraphicsItem.ItemIsSelectable, bool) #!!! Prevents double click to hide.
self._cursorPosOnMoveStart = None
self.setAcceptHoverEvents(True)
@ -1400,7 +1403,7 @@ class GroupLabel(QtWidgets.QGraphicsRectItem):
We don't need to worry about the user just releasing the mouse on this item"""
self._posBeforeMove = self.parentGroupLabel.pos()
self._cursorPosOnMoveStart = QtGui.QCursor.pos()
self.parentGroupLabel.mousePressEvent(event)
#self.parentGroupLabel.mousePressEvent(event) #This blocks mouseMOveEvent
#super().mousePressEvent(event) #with this in mouseMoveEvent does not work. IIRC because we do not set the movableFlag
def mouseReleaseEvent(self, event):

Loading…
Cancel
Save