Browse Source

Add workaround for jump to start shortcut

master
Nils 3 years ago
parent
commit
abcdee905f
  1. 5
      qtgui/designer/mainwindow.py
  2. 7
      qtgui/designer/mainwindow.ui
  3. 1
      qtgui/mainwindow.py

5
qtgui/designer/mainwindow.py

@ -88,7 +88,7 @@ class Ui_MainWindow(object):
self.horizontalLayout_2.addWidget(self.loopMeasureFactorSpinBox)
self.toStartButton = QtWidgets.QPushButton(self.widget_3)
self.toStartButton.setText("first")
self.toStartButton.setShortcut("")
self.toStartButton.setShortcut("Home")
self.toStartButton.setObjectName("toStartButton")
self.horizontalLayout_2.addWidget(self.toStartButton)
self.verticalLayout_4.addWidget(self.widget_3)
@ -170,7 +170,6 @@ class Ui_MainWindow(object):
self.actionAddPattern.setObjectName("actionAddPattern")
self.actionPlayPause = QtWidgets.QAction(MainWindow)
self.actionPlayPause.setText("PlayPause")
self.actionPlayPause.setShortcut("Space")
self.actionPlayPause.setObjectName("actionPlayPause")
self.actionLoop = QtWidgets.QAction(MainWindow)
self.actionLoop.setText("Loop")
@ -196,7 +195,7 @@ class Ui_MainWindow(object):
self.actionAddPattern.setText(_translate("MainWindow", "Add Pattern"))
self.actionAddPattern.setIconText(_translate("MainWindow", "Add Pattern"))
self.actionAddPattern.setToolTip(_translate("MainWindow", "Add a new Pattern Track"))
self.actionToStart.setShortcut(_translate("MainWindow", "Home"))
self.actionPlayPause.setShortcut(_translate("MainWindow", "Space"))
self.actionClone_Selected_Track.setIconText(_translate("MainWindow", "Clone selected Track"))
self.actionAddPianoRoll.setText(_translate("MainWindow", "Add PianoRoll"))
self.actionAddPianoRoll.setToolTip(_translate("MainWindow", "Add PianoRoll"))

7
qtgui/designer/mainwindow.ui

@ -184,7 +184,7 @@
<string notr="true">first</string>
</property>
<property name="shortcut">
<string notr="true"/>
<string notr="true">Home</string>
</property>
</widget>
</item>
@ -403,7 +403,7 @@
<string notr="true">PlayPause</string>
</property>
<property name="shortcut">
<string notr="true">Space</string>
<string>Space</string>
</property>
</action>
<action name="actionLoop">
@ -418,9 +418,6 @@
<property name="text">
<string notr="true">To Start</string>
</property>
<property name="shortcut">
<string>Home</string>
</property>
</action>
<action name="actionClone_Selected_Track">
<property name="text">

1
qtgui/mainwindow.py

@ -161,6 +161,7 @@ class MainWindow(TemplateMainWindow):
self.ui.toStartButton.setText("")
self.ui.toStartButton.setIcon(QtGui.QIcon(':tostart.png'))
self.ui.toStartButton.setToolTip(QtCore.QCoreApplication.translate("PlaybackControls", "[Home] Jump to Start"))
self.ui.toStartButton.setShortcut("Home")
self.ui.toStartButton.clicked.connect(api.rewind)
self.ui.centralwidget.addAction(self.ui.actionToStart) #no action without connection to a widget.
self.ui.actionToStart.triggered.connect(self.ui.toStartButton.click)

Loading…
Cancel
Save