[MusicXML] Layout exports despite being disabled in Preferences

• Oct 15, 2013 - 01:27
P1 - High
S2 - Critical
PR created

1. Open attached MSCZ (produced in 1.3).
2. 'Export...'.
3. Choose 'MusicXML'.
4. 'Save'.
5. Open MusicXML.

Result: Line and page breaks appear.

Using MuseScore 2.0 Nightly Build (1c5b63d) - Mac 10.7.5.


Bug reproduces on reasonably current trunk. The "export layout" switch is simply ignored (preferences.musicxmlExportLayout is missing from the if statement that determines if breaks must be exported). To be fixed.

Severity S3 - Major S2 - Critical
Type Functional Graphical (UI)
Tags View Changes
Frequency Once
Priority P1 - High
Regression No
Reproducibility Always
Workaround Yes

I found this bug is easy to fix. But I'm new to MuseScore development, so I want to double check here.
In exportxml.cpp, when we don't need layout, we should not print anything about the "print" tag. In line 4722, however, it still output "print" tag.
May I start a pull request for this issue?

In reply to by KuribohG

Welcome to MuseScore development ! All help is welcome, especially pull requests.

Before you start, I'd like to make a few remarks. This "bug" was reported long ago and while initially I agreed, as of today I feel slightly differently.

I do agree the current behaviour may be counter-intuitive: the preferences dialog does not allow you to change the "export breaks" setting when "export layout" is disabled. The export code, though, always complies with "export breaks" even when "export layout" is disabled. Apparently some users expect no breaks when "export layout" is off, while actually the export acts according to the break setting (which is disabled in the dialog).

Furthermore, in retrospect I think exporting layout makes no sense without also exporting all breaks, while without other layout info (element positions) exporting the breaks may still make sense.

Thus according to my current opinion, the valid choices would be
- no layout (no positions, no breaks)
- manual breaks only (no positions)
- all breaks only (no positions)
- full layout (all breaks and positions)
This would also require changing the preference dialog.