From aee31a95db46277da4c58a5d9a71969addabbc1d Mon Sep 17 00:00:00 2001 From: Nils Date: Tue, 11 Oct 2022 00:07:44 +0200 Subject: [PATCH] Add option to use current block duration when entering a minimum duration in block properties GUI --- CHANGELOG | 8 ++++++-- qtgui/submenus.py | 9 ++++++++- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 1cfbdaa..312f9fa 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -5,13 +5,18 @@ Two empty lines before the next entry. External contributors notice at the end of the line: (LastName, FirstName / nick) +## 2022-10-15 2.2.2 +Empty blocks with explicit minimum tick duration will not be deleted anymore by "Delete All Empty Blocks" command. +Add option to use current block duration when entering a minimum duration in block properties GUI + + ## 2022-08-15 2.2.1 "Flip the page" earlier during live playback, showing the last measure (or so) twice Add global staff size to lilypond properties and metadata Don't export empty tracks (no duration items) to Lilypond. Always show block labels in block mode. Don't focus on cursor after stretching. -Fix duplicate to reserverd-space block. +Fix "duplicate to reserved-space" block. Fix crash when splitting linked block in multiple tracks. Fix crash related to MultimeasureRests in a context without a MetricalInstruction. @@ -36,7 +41,6 @@ Lilypond Export: Add lilypond template filename to properties and metadata dialog. Will be symlinked into the session dir automatically. - ## 2022-07-15 2.1.0 New function: custom key signature for any combination. Add area in the GUI to set initial key signature, metrical instructions and clefs, accessed through the track editor diff --git a/qtgui/submenus.py b/qtgui/submenus.py index 2bb3811..8862ec5 100644 --- a/qtgui/submenus.py +++ b/qtgui/submenus.py @@ -405,8 +405,15 @@ class BlockPropertiesEdit(Submenu): self.minimumInTicks.setValue(self.staticExportItem["minimumInTicks"]) self.layout.addRow(translate("submenus", "minimum in ticks"), self.minimumInTicks) + self.setMinimumToCurrentButton = QtWidgets.QPushButton(translate("submenus","Set min. to current")) + self.setMinimumToCurrentButton.clicked.connect(self.setMinimumToCurrent) + self.layout.addRow(None, self.setMinimumToCurrentButton) + self.__call__() + def setMinimumToCurrent(self): + self.minimumInTicks.setValue(self.staticExportItem["completeDuration"]) + def process(self): newParametersDict = { "minimumInTicks":self.minimumInTicks.value(), @@ -474,7 +481,7 @@ class TransposeMenu(Submenu): self.done(True) class SecondaryProperties(Submenu): - """Lilypodn Settings and Properties. + """Lilypond Settings and Properties. Directly edits the backend score meta data. There is no api and no callbacks""" def __init__(self, mainWindow):