self.mixerInstructionLabel.setText(_translate("MainWindow","This mixer controls the amount of each loaded instrument in the optional mixer output-ports. Idividual instrument outputs are unaffected."))
<string>This mixer controls the amount of each loaded instrument in the optional mixer output-ports. Idividual instrument outputs are unaffected.</string>
self.treeWidget.setCurrentItem(item)#This will work at first, but as soon as the tab instr/favorites is changed this will jump back to a wrong item (first of the group). We have a tabWidget.changed signal in the main window to reset this
parentLibraryWidget.setExpanded(api.session.guiSharedDataToSave["libraryIsExpanded"][libraryId])#only possible after gi.init() was done and item inserted.
parentLibraryWidget.setExpanded(api.session.guiSharedDataToSave["libraryIsExpanded"][libraryId])#only possible after gi.init() was done and item inserted.
@ -270,7 +286,7 @@ class InstrumentTreeController(object):
"""We do not use the qt function collapseAll and expandAll because they do not trigger
"""We do not use the qt function collapseAll and expandAll because they do not trigger
thesignal"""
thesignal"""
ifself.isNested():
ifself.isNested():
forlibid,guiLibinself.guiLibraries.items():
foridKey,guiLibinself.guiLibraries.items():
guiLib.setExpanded(state)
guiLib.setExpanded(state)
def_adjustColumnSize(self):
def_adjustColumnSize(self):
@ -334,7 +350,7 @@ class GuiLibrary(QtWidgets.QTreeWidgetItem):
super().__init__([],type=1000)#type 0 is default qt type. 1000 is subclassed user type)
super().__init__([],type=1000)#type 0 is default qt type. 1000 is subclassed user type)
self.id=libraryDict["id"]
self.id=libraryDict["id"]
self.idKey=(libraryDict["id"],0)#fake it for compatibility
self.idKey=(libraryDict["id"],-1)#fake it for compatibility. -1 means library
self.name=libraryDict["name"]
self.name=libraryDict["name"]
@ -474,15 +490,22 @@ class GuiInstrument(QtWidgets.QTreeWidgetItem):
definstrumentSwitchOnViaGui(self,state):
definstrumentSwitchOnViaGui(self,state):
"""Only GUI clicks. Does not react to the engine callback that switches on instruments. For
"""Only GUI clicks. Does not react to the engine callback that switches on instruments. For
@ -521,7 +544,7 @@ class GuiInstrument(QtWidgets.QTreeWidgetItem):
def_mixSendDialContextMenuEvent(self,event):
def_mixSendDialContextMenuEvent(self,event):
ifself._cachedInstrumentStatus["mixerEnabled"]:
ifself.cachedInstrumentStatus["mixerEnabled"]:
mixerMuteText=QtCore.QCoreApplication.translate("InstrumentMixerLevelContextMenu","Mute/Disable Mixer-Send for {}".format(self.instrumentDict["name"]))
mixerMuteText=QtCore.QCoreApplication.translate("InstrumentMixerLevelContextMenu","Mute/Disable Mixer-Send for {}".format(self.instrumentDict["name"]))
@ -180,7 +191,6 @@ class MainWindow(TemplateMainWindow):
self.menu.addMenuEntry("menuView","actionPianoRollVisible",QtCore.QCoreApplication.translate("Menu","Piano Roll"),self.pianoRollToggleVisibleAndRemember,shortcut="Ctrl+R",checkable=True,startChecked=True)#function receives check state as automatic parameter
self.menu.addMenuEntry("menuView","actionPianoRollVisible",QtCore.QCoreApplication.translate("Menu","Piano Roll"),self.pianoRollToggleVisibleAndRemember,shortcut="Ctrl+R",checkable=True,startChecked=True)#function receives check state as automatic parameter
self.menu.addMenuEntry("menuView","actionPianoVisible",QtCore.QCoreApplication.translate("Menu","Piano"),self.pianoToggleVisibleAndRemember,shortcut="Ctrl+P",checkable=True,startChecked=True)#function receives check state as automatic parameter
self.menu.addMenuEntry("menuView","actionPianoVisible",QtCore.QCoreApplication.translate("Menu","Piano"),self.pianoToggleVisibleAndRemember,shortcut="Ctrl+P",checkable=True,startChecked=True)#function receives check state as automatic parameter