Resolves: https://musescore.org/en/node/298121.
In addition to making the "Add Interval" commands apply the highlighted accidental when in note input mode, I have corrected a few cases where I had chosen the wrong tpc to use to calculate the AccidentalType for a user accidental, given the current value of styleB(Sid::concertPitch).
Resolves: https://musescore.org/en/node/296065.
Only add a *forced* accidental if there is an accidental selected in the toolbar and the note value is the same as it would be without an accidental.
- tick names a position on the time axis
- tick is always a Fraction()
- only Measure() and Segment() (and Tuplet?) have a tick value
- tick() for an generic element return only a sensible value if isMeasure() or isSegment() or isSegment(parent())
- "ticks" names a duration stored in a Fraction()
- the tick value for an Segment is relative to its measure
- rename "duration" to "ticks"
- rename afrac() to tick()
- rename rfrac() to rtick()
- rename some variables, changing "fraction" into "tick"
(example: actualFraction() into actualTicks())
- Lyrics ticks are written as Fraction, on read if xmlreader sees a "/" it reads a fraction
else midi ticks for backwards compatibility
Previous code crashed when doing a timewise insert at the beginning of
a measure. This was because the call to msMeasure->findFirst searches
for a segment at tick 0, but segment ticks had already been shifted
forward in time with the earlier call to InsertTime. Using
msMeasure->first(SegmentType::ChordRest) avoids that problem.
Second problem was a crash when inserting to beginning of a
multi-measure rest. This was fixed by testing for isMMRest() and using
the multi-measure rest if true.
I also had to change behavior to convert all measure-rests into normal
(non-measure) rests(s) of equivalent duration first before inserting
any additional space. Unfortunately it would have been ideal to
simply keep measure rests and exapand them to fill the new space, but
I couldn't figure out a clean way to do that. So I opted for the
simpler and safer method of converting them into...
Additional note from dmitrio95:
Added handling of situations where other tracks contain non-measure
rests or notes overlapping with the input area. Ensured that all
changes are undoable.