Browse Source

repair gridrhythmedit regression

master
Nils 4 years ago
parent
commit
3f82fdccd6
  1. 4
      qtgui/grid.py
  2. 2
      qtgui/scorescene.py
  3. 2
      qtgui/scoreview.py
  4. 2
      qtgui/submenus.py

4
qtgui/grid.py

@ -66,9 +66,9 @@ class GuiGrid(QtWidgets.QGraphicsItemGroup):
A complete clean and redraw only happens when the tick rhythm changes.
"""
def __init__(self, parent, horizontalSize=None):
def __init__(self, parentScene, horizontalSize=None):
super(GuiGrid, self).__init__()
self.parent = parent #QGraphicsScene
self.parent = parentScene #QGraphicsScene
self.setAcceptedMouseButtons(QtCore.Qt.NoButton) #each line has this set as well
self.setEnabled(False)

2
qtgui/scorescene.py

@ -69,7 +69,7 @@ class GuiScore(QtWidgets.QGraphicsScene):
self.backColor.setNamedColor("#fdfdff")
self.setBackgroundBrush(self.backColor)
self.grid = Grid(parentScene=self)
self.grid = GuiGrid(parentScene=self)
self.addItem(self.grid)
self.grid.setPos(0, -20 * constantsAndConfigs.stafflineGap) #this is more calculation than simply using self.yStart, and might require manual adjustment in the future, but at least it guarantees the grid matches the staffline positions
self.grid.setZValue(-50)

2
qtgui/scoreview.py

@ -25,13 +25,13 @@ import logging; logger = logging.getLogger(__name__); logger.info("import")
#Third Party
from PyQt5 import QtCore, QtGui, QtWidgets, QtOpenGL
#Template Modules
from template.helper import onlyOne
#Our Modules
from .constantsAndConfigs import constantsAndConfigs
from .scorescene import GuiScore
from .submenus import GridRhytmEdit
import engine.api as api
class ScoreView(QtWidgets.QGraphicsView):

2
qtgui/submenus.py

@ -523,7 +523,7 @@ class SecondaryChannelChangeMenu(Submenu):
class GridRhytmEdit(Submenu):
def __init__(self, mainWindow):
super().__init__(mainWindow, "")
super().__init__(mainWindow, "", hasOkCancelButtons=True)
self.mainWindow = mainWindow

Loading…
Cancel
Save