Toggling multi measure rest on and off does not save subsequent barline styles changed exclusively from inspector

• Mar 29, 2016 - 23:28
Reported version
3.0
Type
Functional
Severity
S4 - Minor
Status
closed
Project

Reproduction:

1) Open a new Score
2) Toggle multi measure rest on and then off
3) Change the style of any barline(s) using inspector only
4) Save the mscz file

Result: After closing the save window, the styled barlines in the current score(just saved) get replaced by normal barlines. On loading the saved file too, the barlines don't have their styling any more

Note: This bug doesn't occur when I modify the style of atleast one barline from the Barlines Palette. Setting styles of barlines from exclusively the inspector causes this bug.


Comments

I can confirm. I also see other fun effects, like if I set a custom barline style to any barline using Inspector, then toggle mmrests on then off again, the barline gets reset to normal - either right away, or as soon as I click on it.

When multimeasure is toggled ON, multimeasure rests are assigned to measures in "Measure::Measure* _mmRest;"
But the same _mmrest is never set to null (or 0) when a multimeasure is toggled OFF.
*Is this a conscious design choice?*

I think, NOT setting the _mmrest to null when multimeasure rests are toggled OFF is causing buggy behaviour in many places in the code. For this issue in specific, https://github.com/musescore/MuseScore/blob/master/libmscore/scorefile…, finds m->mmRest() to be valid even when mm rests are toggled OFF and hence sets the barline type to m->endBarLineType(), and not the custom type assigned by the user.

I kind of thnk it is deliberate, although I am not sure. I suspect the idea is to preserve any elements attached to those mmrest measures and any manual adjustments you have made to them, so that after toggling mmrests off and then back on, everythng is just how you left it. I imagine that clearing the mmrest ponters would defeat that.