forked from musescore/MuseScore
-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix #317163: properties lost on save/reload
Resolves: https://musescore.org/en/node/317163 Backport of musescore#7597, resp. duplicated from musescore#7453 The recent changes to style handling result in an extra styleChanged() call on load, which is not a problem in itself but exposes some existing problems in various read() functions. If styled properties were not marked as unstyled during the read, they get reset by this styleChanged() call, meaning any custom settings are lost on load. In fact, they would mostly have been lost after a *second* save/reload even in older versions, since the properties are not marked as unstyled and thus won't get written. But now they are lost immediately upon the first save/reload. The fix is to to be sure we mark the property unstyled on read, which basically means inserting calls to readStyledProperty() in the read() or readProperties() functions of various element types. This was originally reported for volta line style, and I quickly discovered it also appplies to line width, and to pedal line width. I then scanned the code looking for read() functions that did not handle styledProperties. I can't guarantee I found them all, but I did find the mmrest number offset and tuplet number text. The latter actually *seemed* to be handling the styled properties, but only for the tuplet itself, not the number. The font property flags needed to be copied to the number.
- Loading branch information
1 parent
ad15b71
commit c60537a
Showing
4 changed files
with
23 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters