Ottavas are not correctly imported

• Jan 16, 2019 - 03:41
Reported version
3.0
Priority
P0 - Critical
Type
Functional
Frequency
Once
Severity
S3 - Major
Reproducibility
Always
Status
closed
Regression
Yes
Workaround
Yes
Project

Create a score in version 2.x and insert some ottavas (e.g. 8vb, 15ma, etc.).
Import the score into version 3.
All of the ottavas will display as 8va ottavas. Playback of the ottavas is not affected.

The workaround is to either delete and re-insert the ottavas or change the type of the ottava in the inspector.


Comments

Interesting if after importing into MuseScore 3.0.1 and right click the ottavas and open Debugger and click "reset", then the ottavas all correct themselves. So maybe somehow a reset is needed in import?

So far what I've figured out is that if in read206.cpp in readOttava() if I add ottava->ScoreElement::reset(); after the line ottava->setOttavaType(OttavaType(idx));, then everything looks good on import. But I realize that is not the proper way to fix this...

Status PR created fixed

Fixed in branch master, commit 1d1ae55827

_fix #281910 ottava import 2.x

While all the properties of ottavas saved in 2.x files were actually imported into 3.0, however the properties which are affected by the style defaults weren't actually applied, so it seemed as if ottavas with subtype property other than 8va weren't properly imported. Indeed performing any operation which triggered applying the style defaults would reveal that yes the ottavas subtype property was indeed imported, but not apparent.

This fixes the problem by calling styleChanged() at the end of read206.cpp's readOttava() to now trigger these properties to be set according to the style defaults for the particular ottava subtype. So now the different types of ottavas actually get their style applied during import._

Fix version
3.0.3