fix #222171: cannot enter chord mid-measure in empty measure #3211
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.
The main issue here is the change in harmonyBeatsTab, we aren't calculating ticks correctly when testing to see if going to the next chordrest segment has overshot the beat. The original calculation was good before a change a few months ago that required the Segment constructor to be called differently (see 4e0b0db#commitcomment-22518030), so I've just update the code to only change the call there rather than changing the meaning of newTick throughout this function.
I also made a fix to cmd(), where the "chord-text" command was actually forcing a change to note input state before entering the chord. This also seems to have been a recent "regression" that was basically an oversight. I don't know that it currently has any bad effect, because we later force a change to edit state. But it does prevent my PR for #3199 from working correctly - it similarly prevents a chord symbol from being added mid-measure in empty measures.