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>
as requested/discussed in PR #4989, by using size_t or at least
unsigned instead of casting to int when using the size() method of stl
containers (vectors etc.) in for loops.
Doesn't work everywhere though, not without either adding more casts
elsewhere or with massive code changes or with different compiler(s')
warnings.
Tested with MinGW 64-bit, MinGW 32-bit and MSVC 64-bit.
Resolves: https://musescore.org/en/node/287998
Resolves: https://musescore.org/en/node/102676
When a measure contains a line or page break **and** the next measure contains a key/time
signature or clef change, a courtesy element is drawn at the end of the measure.
However, if all measures **after** the line or page break are deleted, these courtesy
elements are not removed because Measure::addSystemTrailer(Measure*) is never called
in Score::collectSystem(LayoutContext&) since there is no next measure. As a result
these courtesy elements are not disabled by Measure::addSystemTrailer(Measure*).
The solution is to call Measure::addSystemTrailer(Measure*) even when nm equals 0 and
Measure::addSystemTrailer(Measure*) will disable all courtesy elements in case nm equals 0.
* Found via `codespell -q 3 -S ./share/locale,./thirdparty -L ba,cann,clas,dur,foto,iff,nd,ois,ot,pres,possibile,snaped,strack,tage,te,uint,thru,valu`
* Some revisions made per feedback given during review.
* Follow-up typos for review
* Add revisions per feedback
Resolves: https://musescore.org/en/node/295892
If a measure is followed by a horizontal frame and then a measure with a start repeat,
the end barline of the first measure is not displayed.
This is because we are optiizing that away thinking it won't be needed
because we will simply use the start repeat of the next measure.
This would be true if not for the frame.
So I simply added a check to make sure the next measure is the same as the next measurebase,
and clarified the comments.
Resolves: https://musescore.org/en/node/292606.
Images added to a measure now belong to the measure itself, rather than to one of the measure's segments. This not only allows the image to be visible, but it also solve problems related to the positioning of the image.
Resolves: https://musescore.org/node/294580.
Right now a courtesy time signature only generates if the local time signature is on the first staff, because the code only checks for the first track. The fix checks for all tracks.
Blind users find it disorienting for the previous element command to wrap to the end,
or for next element to wrap back to the beginning.
Besides, no other navigation commands work that way.
This commit stops that behavior by simply swapping the calls
to Score::lastElement() and Score::firstElement() in the places where this wrapping occurs.
That is, if previous-element finds no previous element,
we return the first element.
The navigation code for next-element and previous-elements ignores measure elements
(elements in the el() list for the measure).
This change adds handling for this
by checking for measure elements before moving to the next or previous measure
in Segment::nextElement() and Segment::previousElement(),
There is corresponding code in Measure::nextElementStaff()
and in Measure::previousElementStaff()
to iterate through multiple elements if present.
Added code to read the text within frames in accessibleExtraInfo(),
but also fixed the navigation to check for a frame
before moving to the next/previous measure.
Because frames will generally have a track of -1,
I also needed to take advantage of the tracking of the current track from a previous commit
so that nagivation continues on the correct track after passing through a frame.
I also needed to be careful to handle the -1.
Comes from https://musescore.org/en/node/290398#comment-940605. This can cause a serious delay on big scores.
The idea of fixing is changing the score()->setLayoutAll() to triggerLayout() in the functions of dropping and editing spacers. triggerLayout() will only do neccessary partial layout.