Inability to delete one or more brackets

• Jul 5, 2017 - 15:07
Reported version
3.0
Type
Functional
Severity
S3 - Major
Status
closed
Project

Current 3.0 dev. 8fb09aa/ Windows10

1) « Untitled » score
2) Select the first measure
3) From brackets palette: Double-click consecutively on each symbol : bracket, brace, square, line

- You observe the four symbols are hidden one by the another (except brace, but not optimal)
brack.jpg

4) Right-click → Select → All similar elements
5) Ctrl + X

Result, unexpected : only a bracket is removed.
This is combined, secondly, to the inability to cut them individually (the only way is by undoing)

Note : I get some crashes by testing this issue, after some undos, and after re-begin the process in a different order (or not)
But by now only in a random and instable way.


Comments

Title Inability to delete two or more brackets Inability to delete one of more brackets

Currently, it's worse with 9a9256c. You cannot remove any bracket.

1) Default "Untitled" score
2) Add a bracket (or brace etc.)
3) Select it -> Del

Result: nothing, the bracket remains in place.

That commit on June 8 disallows the deletion of generated elements. Each staff maintains a list of bracket items, and brackets are generated from these lists, so an exception must be made to allow the deletion of brackets, even though they are generated elements. To allow for nested brackets, each bracket has a column property, and if this property does not match the bracket item’s position in its staff’s bracket list, then the bracket may not be able to be deleted, or the wrong bracket may be deleted instead.

I have noticed the following problems in the code:

  1. When a bracket item is added to a bracket list, its column property is currently set to the default value of 0, regardless of where it is in the bracket list.
  2. A bracket’s column property may be modified (via the inspector), but this does not cause a change in its position in the bracket list.

Care should be taken to ensure that a bracket’s column property always matches its position in the bracket list. Clearly, no two bracket items in the same list should ever have the same column value, so a change made to one bracket’s column property may affect some or all other brackets in the same list.

Also, because of the way the staff creates and deletes bracket items as necessary, bracket items should not be pushed onto the undo stack, but must instead be obtained from their staff’s bracket list.

I agree with Jojo.

Your issue seems to be specific to MusicXML import, so it would be best to mention that. For that matter, it may be specific to a single MusicXML file. Your suggested workaround is fine; alternatively, you could delete the brackets and braces from the MusicXML file before importing it into MuseScore.