Slurs to grace notes disappear after inserting measures
OS: Windows 10 (10.0), Arch.: x86_64, MuseScore version (64-bit): 3.2.3.7635, revision: d2d863f
- Create an empty score.
- Add a note in bar 1 and in bar 2
- Add a grace note to each main note
- Add slurs from the grace notes to the main notes
- Insert one or more measures immediately before bar 2
Result: the slur in bar 1 remains correctly placed; the main note and grace note in bar 2 are shifted right to accommodate the inserted bar(s); the slur attached to the note in the original bar 2 is not shifted right and is positioned on the screen where it was before the bar was inserted.
- Save score
- Re-open score
Result: the misplaced slur is no longer shown - i.e. neither in its misplaced nor its "correct" position - it has just disappeared.
- Add a note the last bar of a system.
- Add a grace note and slur to the main note
- Insert a bar immediately before this to force the next bar onto the next system.
Result the slur from the grace note to the main note has disappeared (there is no misplacement - it has just gone.)
But if, instead of 10, you add a system break immediately before the bar with the gracenote the slur from the grace note to the main note moves with the note onto the next system.
Other information:
- The same behaviour occurs for all types of grace note, and for groups of grace notes.
- The same behaviour happens in page view and continuous view.
- A tie between a grace note and a main note is not affected - i.e. it moves with the notes.
- Before saving and re-opening, selecting the misplaced slur and inspecting it shows zero offset.
- Before saving and re-opening, the "elastic" lines shown after double clicking on the misplaced slur indicates that it is still associated with the grace note and main note.
- Forcing a re-draw by switching between continuous view before saving and re-opening leaves the slur in its misplaced location - it does not disappear until the score is saved and re-opened.
This behaviour is particularly annoying as it is very rare that a grace note is not slurred onto the main note and all grace note to main note slurs in a score that occur after the insertion point of the new bars are affected and have to be replaced after bars have been inserted. Clicking on a grace note and using "select all similar" does not help as with all gracenotes selected if one adds a slur, this is entered as one huge slur from the first grace note to the last grace note. Each gracenote has to be a) found, b) selected, c) have a slur added individually. This gets tedious and is error prone.
Comments
Just checked behaviour of:
and
MS 2.3.2 behaves OK. The slurs move with their associated notes and grace notes after bars are inserted and remain in the score after a save and reload. So definitely a regression
MS 3.3.0 has the same bad behaviour reported in the original post.
See https://github.com/musescore/MuseScore/pull/5432.
Fixed in branch master, commit a37fda3e5b
_fix #295703: Slurs to grace notes disappear after inserting bars
Resolves: https://musescore.org/en/node/295703.
When the SPANNER_TICK property of a spanner changes, the spanner's startElement and endElement are invalidated. Usually the spanner's start and end elements can be recalculated from the SPANNER_TICK and SPANNER_TICKS properties, but since grace notes occur on the same tick as their parent notes, determining the real start and elements for grace note slurs is tricky. The solution here is to invalidate the start and end elements in an undoable manner before changing the SPANNER_TICK property of the spanner when time is added or removed before the spanner's start, and then set the start and end elements back to what they were. This required modifying Score::undoChangeSpannerElements() so that the start and end elements can be changed to or from nullptr._
Fixed in branch master, commit 9c5ee8e135
_Merge pull request #5432 from mattmcclinch/295703-grace-note-slur
fix #295703: Slurs to grace notes disappear after inserting bars_
;-)
In reply to (No subject) by Jojo-Schmitz
Is there really much difference between "bar" and "measure"?
Different language ;-)
In reply to Different language ;-) by Jojo-Schmitz
The OP used "bar" throughout the whole description, why change it in the title ;-)
I (the OP) used "bars" as that is what MS uses in it's menu -"Insert bars". Or is that just a UK localisation thing? Whatever, "bars"/"measures" doesn't worry me.
In reply to I (the OP) used "bars" as… by SteveBlower
Yes, UK has "bar" and US has "measure".
The issue tracker is generally in American English as a standard. It makes it easier to find existing issues if there is consistency. The is actually a British English translation of MuseScore so those who speak the British form have MuseScore in their own language, just as is done for the French, Dutch and so forth.
Automatically closed -- issue fixed for 2 weeks with no activity.