Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix #281910 ottava import 2.x #4596

Merged
merged 1 commit into from
Feb 7, 2019

Conversation

ericfont
Copy link
Contributor

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.

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.
@anatoly-os
Copy link
Contributor

@ericfont I don't see any calls to styleChanged() in read206.cpp file. It means other styles somehow work. Why?

@ericfont
Copy link
Contributor Author

I don't know for sure...been trying to figure that out. It should be noted that the regular Ottava::read() has a call to styleChanged(), as well as several other elements, but not all. So maybe only some elements need to call styleChanged() upon read, and maybe all the other read206 functions that don't call styleChanged() are ones that simply don't need it.

I'm noticing that hairpin is one of those whose normal read() does call styleChanged(), and while its read206 variant doesn't directly call styleChanged(), it does so indirectly via its call to setHairpinType() which does call styleChanged(). Although I don't know if that happens for all the elements which normally require a call to styleChanged().

I don't have time to investigate further at the moment why none of the other read206 functions call styleChanged() on read (or maybe those that do somehow do it indirectly). Maybe someone else knows the answer? (I'm also wondering if should add a styleChanged() for every element read function for read206...I can't imagine there would be any undesired side-effects of that...)

But without knowing any of those details, my guess would be that read206's readOttava is one of those special elements which simply needs a styleChanged() call, as my PR does.

@anatoly-os anatoly-os merged commit 740467d into musescore:master Feb 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants