Copy-paste breaths & pauses causes bad layout of the first note/rest in following measures

• Jul 9, 2019 - 09:02
Reported version
3.2
Priority
P1 - High
Type
Functional
Frequency
Once
Severity
S3 - Major
Reproducibility
Always
Status
closed
Regression
Yes
Workaround
Yes
Project

OS: Windows 10 (10.0), Arch.: x86_64, MuseScore version (64-bit): 3.2.3.7635, revision: d2d863f

1) Default score
2) Enter four quarter notes (test file: breath.mscz )
3) Add a breath or pause (no matter, all symbols of this palette are involved) on the last quarter note
4) Copy-paste this measure in the immediate following (measure 2)
First result: nothing especial
5) Continue to copy-paste in measures 3, 4 etc.

Result: unexpected: wrong layout of the first note (or rest) which collides the barline

See:

Video_2019-07-09.gif


Comments

Regression No Yes
Workaround No Yes

And so, the workaround is to copy-paste without breath & pause, and this done, re-add breath & pause.

Status PR created fixed

Fixed in branch master, commit a4a5173e03

_fix #291932: Copy-paste breaths & pauses causes bad layout of the first note/rest in following measures

Copying and pasting a breath mark on the last tick of a measure resulted in an empty Breath segment being created in the next measure. This is because the last tick of one measure is equal to the first tick of the next measure, and Score::tick2measure() always returns the second measure in this case. When the Breath mark actually gets added to the score in Score::undoAddElement(), a new segment for it is created in the previous measure. This is the measure in which we should be adding the segment in the first place._

Fix version
3.3.0