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/300926.
This allows a full measure rest to be changed into a "normal" rest even if the actual length of the rest is not being changed.
PR5321 solved [#110386]. However, there were still some beaming shortcuts missing and it
was suggested by Jojo-Schmitz to implement there too. Due a misunderstanding from me this
wasn't done by then.
This PR implements these suggestions and makes the shortcuts for beaming complete.
Resolves: https://musescore.org/en/node/298959.
Note: In the following paragraphs, I use the word "microtonal" to refer to all accidentals for which Accidental::isMicrotonal() currently returns true. That is, all proper microtonal accidentals as well as NATURAL_FLAT, NATURAL_SHARP, and SHARP_SHARP.
When force adding or force removing an accidental, Score::changeAccidental() will remove a note's existing accidental (if any) from the score. When not force adding or force removing an accidental, the note's pitch is changed, but the accidental is left alone until Note::updateAccidental() is called. But Note::updateAccidental() does not touch microtonal accidentals, so any existing microtonal accidentals must be removed in Score::changeAccidental().
Also, when changing from a microtonal accidental to a non-microtonal accidental that results in the same change to the pitch of the note, the new accidental's role is currently set to USER every time, when in fact this should only be done if it truly is a courtesy accidental. So when determining whether or not the accidental is being force added, when we are comparing the new pitch to the old pitch, we should also look at whether the old accidental was microtonal or not, to make sure that the accidental's role is not being set incorrectly.
* 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/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).
- Don't pass staff number to adjustCanvasPosition if trying to
adjust viewport to a frame. This avoids a crash itself.
- Implement a more robust approach to determine a measure relevant
to the current edit operation in CmdState. This avoids trying to
unnecessarily jump to the frame at the end of a score.
1) Fix incorrect track2 assignment to spanners on pasting in some
situations due to not handling the case of track2 == -1.
2) Fix staff index checks in ScoreView code to avoid a crash if
incorrect staff index gets recorded to CmdState.
3) Add an assertion to catch invalid negative staff indices recorded
to CmdState.
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.