musescore/MuseScore — pull request #1525 by MarcSabatella (2014-12-09 22:36:40+00:00)
Title: Resequence rehearsal marks

Added new command to resequence existing rehearsal marks (score wide or within selection), and tweaked behavior of the existing automatic rehearsal mark to take advantage of the new sequencng algorithm where possible.

The sequencing algorithm looks at the first rehearsal mark in the selection/score. If it is within the sequence A, B, C, ... Y, Z, AA, BB, ..., YY, ZZ (or lower case equivalent), then remaining rehearsal marks are resequenced accordingly, with rehearsal marks after ZZ left unchanged. If the first rehearsal mark in the selection/score is a number, we use an ordinary numeric sequence, unless the number matches the measure number, in which case we use measure numbers throughout.

The tweak to the existring automatic facility is to first try to add the newly added mark using the new sequencing facility. If the calculated value does not match the next mark - eg, if there was a "hole" in the sequence - we go ahead and use the calculated value. Otherwise, we fall back on what the existing facility was already doing - incrementing the second character or appending a "1" as appropriate.