-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Add default setting for Merge matching rests
in Staff properties.
#25134
Add default setting for Merge matching rests
in Staff properties.
#25134
Conversation
I am changing this to Draft status, because I realized that file imports do not pick up the default. At a minimum, file imports from Midi files and MusicXML files should pick up the default. I can't seem to find a central add staff place that seems safe to add this where all paths would pick it up. |
I added initialization based on the setting to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this PR, the new style setting is only used to determine the value of "merge matching rests" for newly added staves, and not existing staves. I think that limits the usefulness of this option.
Personally I think it would be preferable to turn the existing staff property into an Auto / On / Off property, where Auto means "follow the score-wide setting". @oktophonie do you think this too?
This could be implemented in two ways:
- Change the type of
Staff::mergeMatchingRests
frombool
toAutoOnOff
- Turn it into a property that is linked to the score-wide style setting; that means that the type stays
bool
, but modifying the value should be done viagetProperty
/setProperty
, or ratherundoChangeProperty
to make it undoable;PropertyFlags
are used to determine whether this staff should follow the global style setting (PropertyFlag::STYLED
means follow the style;PropertyFlag::UNSTYLED
means the property is overridden for this staff); useEngravingObject::initElementStyle
in the constructor ofStaff
to set up the "connection".
src/notation/qml/MuseScore/NotationScene/internal/EditStyle/RestOffsetSelector.qml
Outdated
Show resolved
Hide resolved
|
|
src/notation/qml/MuseScore/NotationScene/internal/EditStyle/RestOffsetSelector.qml
Outdated
Show resolved
Hide resolved
src/notation/qml/MuseScore/NotationScene/internal/EditStyle/RestOffsetSelector.qml
Outdated
Show resolved
Hide resolved
…ingRests in the Staff factory. This picks up all the file imports without any need for changing them.
8cf80cc
to
5fa306a
Compare
I rebased to the latest master and now this PR is getting a lot of test errors that do not seem related to my PR. Any idea what's going on? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Final comments, I think!
src/notation/qml/MuseScore/NotationScene/internal/EditStyle/RestOffsetSelector.qml
Outdated
Show resolved
Hide resolved
src/notation/qml/MuseScore/NotationScene/internal/EditStyle/RestOffsetSelector.qml
Outdated
Show resolved
Hide resolved
Apparently, changing |
I backed out the non-comment change to If you think the update should be part of the PR, I will need some guidance on what needs to change in the test files so that the Thank you for your due diligence. I am really impressed and grateful at the care you take. |
Changing MSCVERSION etc. indeed requires basically all test scores to get changed, I'd rather leave that to the core team ;-) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, looks good to me from a technical point of view!
Tested on MacOS 14, Windows 11, Ubuntu 22.04.3. Approved |
Resolves: #24983
Implements a new style setting for the default value of staves'
Merge matching rests
setting.The setting in Staff properties is now an
AutoOnOff
:Auto
takes the setting from the Style settingOn
force it on (same as checking the previous setting)Off
forces it offSince the default value of the new Style setting is unchecked, imports of files created before this Style setting was available remain visually identical. If the staves were unchecked, they are converted to
Auto
. If the staves were checked, they are converted toOn
.