ticks_f warnings when loading a custom workspace

• May 9, 2020 - 22:08
Reported version
3.4
Type
Functional
Frequency
Once
Severity
S4 - Minor
Reproducibility
Always
Status
closed
Regression
No
Workaround
No
Project

Loading a custom workspace in a debug build of MuseScore causes (in my case) 35 lines to be printed to the console window that all look something like this:

2020-05-09 15:40:58.446231-0400 mscore[5126:96339] line 1025 col 21: ticks_f

The XmlReader is finding 35 occurrences of a <ticks_f> tag that it does not expect.


Comments

Status PR created fixed

Fixed in branch 3.x, commit 2c69a6dc1f

_Fix #305209: ticks_f warnings when loading a custom workspace

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

When reading in XML data, the _pasteMode flag of the XmlReader should match the _clipboardmode flag of the XmlWriter that wrote the data. In each of the four places that an XmlWriter is constructed in mscore/workspace.cpp, the _clipboardmode flag of the XmlWriter is set to true. For this reason, in each of the four places that an XmlReader is constructed in mscore/workspace.cpp, the _pasteMode flag of the XmlReader should be set to true to ensure that the data is interpreted correctly.

For example, the XML for a Spanner object will include a "ticks_f" tag if and only if the clipboardmode flag of the XmlWriter is true. When this XML is read back in, the XmlReader will not expect to find a "ticks_f" tag if its _pasteMode flag is false.

Fix version
3.5.0