Resolves: https://musescore.org/en/node/301605.
Prior to this commit, ScoreView::cmdAddSlur() could be called multiple times from within ScoreView::addSlur(), resulting in the need for multiple "undo" commands to completely undo a single "add-slur" command. This commit swaps the names of these two functions, and, more importantly, only calls Score::startCmd() and Score::endCmd() once for the entire operation.
Fixed a problem that caused the “Selection Filter” item in the “View Menu” to be unchecked at application startup when the “Selection Filter” panel was in fact visible.
Resolves: https://musescore.org/en/node/301478.
When importing scores from 1.x or 2.x, the property flags for styled properties must be set to UNSTYLED. Otherwise, the properties will not be written when the score is saved. ScoreElement::readProperty() should be used wherever possible, since it takes care of setting the property flags correctly. When it is not possible to use ScoreElement::readProperty(), ScoreElement::setPropertyFlags() must be called after setting the property.
Resolves: https://musescore.org/en/node/301436
The accessibility navigation commands
(Alt+Left/Right, also Ctrl+Alt+Shift+Left/Right)
were not properly checking for mmrests,
resulting in selection of elements in the underlying measures
that were not valid in the current layout.
This adds the necessary checks.
Mostly just a matter of adding "MM" to various function calls.
In a couple of places, the appropriate function did not exist,
so I added it.
Also corrected errors in Ctrl+Alt+Shift+Left/Right
that occurs when going past the end of a staff,
the code to wrap around to the next staff this case well.
In part this is because the implementation of barlines changed
since the code was written.
Barlines are per-staff now even when spanned,
so the use and management of prevTrack is no longer appropriate.
Resolves: https://musescore.org/en/node/301414.
During paste, if a note has a tie, that tie is remembered as a pending connector which is later added to the score when XmlReader::checkConnectors() is called. If a note is too long to fit in the measure, it is split up into a series of tied notes, but the pending tie needs to be adjusted to begin at the last tied note in the series, instead of at the original note.
Corrects first problem: Status doesn't display the pitch of note that have an
ottave line. This is solved in Note::tpcUserName().
Solves the second problem in issue 293593: Accidentals do apply if 8va sign is added.
This is solved in Note::updateAccidental(). All calculations are based on the
effective pitch of the a note rather than the actual pitch. The solution now
takes to ottava signs into account by using the actual pitch.
For easily find out wheather an ottava is applied, a new method ottavaCapoFret()
is added which returns the pitch offset by an ottava (or capo fret). To prevent
code dublication, ppitch() also use this new ottavaCapoFret() method.
Resolves: https://musescore.org/en/node/301174.
When restoring a range selection that ends on the last tick of a measure, make sure that it is not extended to the first tick of the next measure.
The staff index did not count `staffMove()` in, which resulted in possibly getting the wrong clef for `line2pitch()`. This commit uses `chord->vStaffIdx()` to get the right staff index.