Extend brackets on other staves is not saved
GIT commit : 9a9256c / Windows10
1) Untitled "default" score
2) Add an instrument (eg violin)
3) Add a bracket
4) Extend this bracket over the two staves
5) Save as -> Name the file -> Save
Result: the bracket extension is lost.
-
With more instruments:
-
First reported in https://musescore.org/en/node/273214
Comments
This issue occurs on last May 25.
The bracket extension is kept with: 9e937ba
And lost with: 2c612a8
But this commit/nightly and the two previous are related to text issues ie: https://github.com/musescore/MuseScore/commit/24014b6b592833d9a552ee1f2…
and https://github.com/musescore/MuseScore/commit/2c6b658729169ff930d34c747…
So, I don't really know.
Other aspect: instead of saving the file, in step #5, do: Undo / Redo, ie:
1) Untitled "default" score
2) Add an instrument (eg violin)
3) Add a bracket
4) Extend this bracket over the two staves
5) Undo -> Redo
Result: Undo works, Redo fails
Test file: piano violin.mscz
So, more here perhaps? https://github.com/musescore/MuseScore/commit/2c6b658729169ff930d34c747…
The bracket's span property is calculated by Bracket::endEditDrag(). This function is called twice: first when the drag is completed, and again upon exit from edit mode. The span is calculated correctly the first time, and incorrectly the second time. I am not sure why endEditDrag() is being called from within Bracket::endEdit(), but removing that call seems to solve the problem.
The problem is that by the time endEditDrag() is called from Bracket::endEdit(), the bracket and its parent system have already been destroyed and recreated during score layout. Because of this, pagePos() returns (0,0), which gives ay1 a value of 0. This can be solved by making ay1 a member variable of the Bracket class, and setting its value in Bracket::startEdit().
Came up again on 2018/08/09 : #275113: System bracket does not extend to all staves after save
I implemented the suggestion from my last comment as part of https://github.com/musescore/MuseScore/pull/3953.
Fixed in branch master, commit 1181ccb031
fix #273292: Extend brackets on other staves is not saved
Automatically closed -- issue fixed for 2 weeks with no activity.