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 #317272: page settings dialog shows wrong values in pre-3.6 parts #7514

Merged
merged 1 commit into from
Mar 4, 2021

Conversation

MarcSabatella
Copy link
Contributor

Resolves: https://musescore.org/en/node/317272

When displaying the page settings dialog,
we create a preview by cloning the score,
and the dialog actually manipulates the preview's values.
However, the clone is always forced to current style defaults,
so for pre-3.6 scores that, the preview and the spinboxes show
new 3.6 defaults as opposed to the old.
This causes the preview to display completely unlike the actual score,
and it also means the default values for the margins are wrong.

A full fix for this would involve re-examining the logic used
in the clone() methods for both Score and MasterScore.
But there could be any numebr of side effects to this.
So the fix here is very conservative:
it just overrides the clone's style with the original style
after the fact.
Thus it can only affect the page settings dialog.

It should also be noted this bug only affects parts, not parent scores.
That is because the process of reading/writing the parent score
resets the style again based on version tags encountered.
So probably there is another fix here involving that logic.
This too would almost certain have side effects.

Resolves: https://musescore.org/en/node/317272

When displaying the page settings dialog,
we create a preview by cloning the score,
and the dialog actually manipulates the preview's values.
However, the clone is always forced to current style defaults,
so for pre-3.6 scores that, the preview and the spinboxes show
new 3.6 defaults as opposed to the old.
This causes the preview to display completely unlike the actual score,
and it also means the default values for the margins are wrong.

A full fix for this would involve re-examining the logic used
in the clone() methods for both Score and MasterScore.
But there could be any numebr of side effects to this.
So the fix here is very conservative:
it just overrides the clone's style with the original style
after the fact.
Thus is can only affect the page settings dialog.

It should also be noted this bug only affects parts, not parent scores.
That is because the process of reading/writing the parent score
resets the style again based on version tags encountered.
So probably there is another fix here involving that logic.
This too would almost certain have side effects.
@MarcSabatella
Copy link
Contributor Author

This one I cannot see how to adapt for master - Score::clone() is entirely different, and pagesettings.cpp no longer exists. It's very possibly the issue no longer relevant anyhow as probably we don't intend to continue to special case these imports.

But, this is definitely something that should be high priority for 3.x, so I'd recommend merging this even without a corresponding PR for master.

@vpereverzev vpereverzev merged commit 1874603 into musescore:3.x Mar 4, 2021
@Jojo-Schmitz
Copy link
Contributor

I wonder whether this would need to get ported to master

@MarcSabatella
Copy link
Contributor Author

Perhaps, but since it deals with dialog code that I assume has been or is being completely rewritten, I will leave it to someone else.

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.

3 participants