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

[MU4] Change default for enableVerticalSpread to be in line with 3.6 #11091

Merged

Conversation

asattely
Copy link
Contributor

@asattely asattely commented Apr 4, 2022

Resolves: #11023

The 302 default for enableVerticalSpread was false, so the 302 defaults file had to be changed to be in line with it.

@oktophonie
Copy link
Contributor

The default (as defined in style.cpp) in MuseScore 3.6 (= file format version 302) is indeed false, so this fix is correct. However, it becomes set to true at some point for all new scores created in 3.6, which is a bit confusing. I'm not sure now whether this was a deliberate decision or is just an oddity.

@Jojo-Schmitz
Copy link
Contributor

It is explicitly set to true on start of MuseScore (in 3.x), if not in test or template mode:

      // initialize current page size from default printer
#ifndef QT_NO_PRINTER
      if (!MScore::testMode && !MScore::saveTemplateMode) {
            QPrinter p;
            if (p.isValid()) {
//                  qDebug("set paper size from default printer");
                  QRectF psf = p.paperRect(QPrinter::Inch);
                  MScore::defaultStyle().set(Sid::pageWidth,  psf.width());
                  MScore::defaultStyle().set(Sid::pageHeight, psf.height());
                  MScore::defaultStyle().set(Sid::enableVerticalSpread, true);
                  }
            }
#endif

Since 4916486, MuseScore 3.6 Alpha

@Jojo-Schmitz
Copy link
Contributor

Jojo-Schmitz commented Apr 5, 2022

So it is set to true for all 3.6 AKA 302 scores. Unless the template used sets it otherwise.
Makes this PR mute I guess?

@oktophonie
Copy link
Contributor

You mean moot, I guess ;)

The point is that only the settings that differ from the defaults given in style.cpp (now styledef.cpp) are saved in the file. So, if the user disables vertical spread in the 3.6 file, that property will not be explicitly included, but if they leave it set to enabled (which is what they will generally be presented with for a new file, for the reasons you mention), it will be included, since that's technically not the default.

When it comes to migration, we need to reference a style sheet that contains all the defaults for the previous MU versions (as taken from style.cpp), and the default in 3.6/302 is indeed false, so this PR does make sense, though I can't deny it's all a bit confusing.

@Jojo-Schmitz
Copy link
Contributor

Yes, I did. I noticed that it looked wrong but couldn't spot the error ;-)

And yes, I see now. That option not being set in 302 means disabled. So the PR seems correct.

@RomanPudashkin RomanPudashkin merged commit b9ab412 into musescore:master Apr 5, 2022
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.

[MU4 Issue] "Disable Vertical justification of staves" setting is being ignored in imported MS3 files
4 participants