Fix #14678: Tempo set in New Score other than quarter note doesn't reflect supposed BPM #21458
+12
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Resolves: #14678
Resolves a bug where new scores would not have the correct tempo marking when a non-quarter-note tempo was specified. This is accomplished by correcting the implementation of the
MasterNotation::applyOptions
method. When setting the tempo of the score, we use the tempo'sduration
option to scale the bpm value so that it is in units of "Quarter Notes / Second" rather than "Duration / Second".I don't know enough about this repository to write unit tests for this change. If maintainers feel that these changes necessitate unit tests, please point me in the direction of some similar samples and/or documentation, and I'll see what I can do.