Fix drawing of ghost notes when detuning #7465
Open
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.
Description
This pull request makes the detuning ghost notes actually be drawn in their proper position and size in the Automation Editor. Additionally, when opening the Automation Editor for detuning, the default vertical zoom is changed to 200% to focus on smaller changes instead of the whole -60 to 60 semitones. However, since that default vertical zoom persists between Automation Editor sessions, the default vertical zoom for all other automation clips is changed to
Auto
so that the 200% zoom is reset.Changes
AutomationEditor::setCurrentClip()
, an if statement is added which sets the default vertical zoom depending on whether it is for detuning or not.AutomationEditor::paintEvent()
, if the ghost notes are for detuning, they
pixel position of each ghost note is calculated usingyCoordOfLevel()
to get the correct position relative to the grid. Additionally, the height of each semitone is calculated viayCoordOfLevel(0) - yCoordOfLevel(1)
.Note
I am aware that setting the zoom to default every time an automation clip is opened is not ideal, since some individuals may wish to have their zoom preferences persist between clips. On the other hand, some may find it useful that the zoom resets each time. I would love to hear your opinions.