Measures still initially present after Delete Selected Measures in Continuous View

• Nov 11, 2014 - 20:24
Type
Functional
Severity
S2 - Critical
Status
closed
Project

1. Open 'My First Score', or create a piano score with a vertical frame.
2. 'Continuous View'.
3. 'Edit'>'Select All'.
4. 'Edit'>'Measure'>'Delete Selected Measures'.

Result: Measures ('My First Score'), or one of two staves (piano score) remain.

Note: Going to 'Page View' and back to 'Continuous View' show the expected behaviour.

Using MuseScore 2.0 Nightly Build 1d7b575 - Mac 10.7.5.


Comments

If the measures contained any notes, you can still play with them and enter notes, and it's just a matter of time before you get a crash (I got it by trying to enter a tuplet into one of these phantom measures). So I've upgraded to critical.

I've done a little analysis, and while I can't say I fully understand this part of the code, I can see where the problem is. It stems from this recent fix:

https://github.com/musescore/MuseScore/commit/8e48f3211b6085fc90d860de0…

I see why that fix was made, but I think returning early isn't good enough. We still need to clear out the bspTree. Unfortunately, bspTrees are Greek to me. I will propose the fix in the following PR, where I simply set h & w to 0 if there are no systems or measures:

https://github.com/musescore/MuseScore/pull/1451

It seems to work - and still seems to fix the problems that the previous commit was trying to fix - but it's not like I can really explain why.