Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't mess up brackets in
Score::undoAddBracket
We seem to assume that for each staff, for each of its brackets, the column of the bracket is equal to the index at which the bracket is stored in `_brackets`. But this is completely messed up in `Score::undoAddBracket`. We update the column of the brackets, but don't move them in the list, which is wrong. This caused a crash somewhere later. The solution is to also move them in the list, but we need to do that carefully: brackets might be "cleaned up", which means that brackets with `BracketType::NO_BRACKET` at the end of the list are deleted (as in, immediately destroyed). This means that we must be careful about brackets with type `NO_BRACKET`, and the length of the list may decrease.
- Loading branch information