This factors out the inner workings of Measure::checkMultiVoices() into a variant of Measure::hasVoices() that takes a start tick and a length in addition to a staff index.
Co-authored-by: Howard-C <howardc@pku.edu.cn>
Added code to track the staff & bar number when constructing accessibility text.
If we detect that a navigation has not changed either, we skip reading it,
by constructing a separation "optimized" version of the appropriate text.
Also skip reading voice for measures that have only a single voice,
by suppressing the buiding of that string in screenReaderInfo() for both Note and Rest.
- 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
A very minor but noticeable slightly annoying glitch would occur while dragging Measure Rests: their x position would be relative to the initial tick even though their position is relative to their parent measure center.
This occurs because Measure Rests are supposed to be laid out in the center of their measure...but unfortunately it is not easy to lay them out because their x position is dependent on layout of their parent measure. So to make things simple, to avoid this glitch I'm disabling this ability. I doubt anyone will complain. Users may still adjust position of measure rests by using inspector x/y offset or pressing up/down on keyboard.
The problem is deep in the initialization of staff types in Staff.
This commit also tries to make handling of StaffType more "const correct" and adds some
assertions which may lead to crashes (and helps detecting bad code).
* The one C4100
* The one C4189
* The two C4457
* The two C4701
* The 475 C4267, changing to size_t were easily possible, casting to
int elsewhere
* Fix GCC warnings reg. wrong printf format for a size_t, reg. unused
variables and reg. ambigous else branch, seen on Travis CI