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 #305209: ticks_f warnings when loading a custom workspace #6072

Merged
merged 1 commit into from
May 12, 2020

Conversation

mattmcclinch
Copy link
Contributor

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 element 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.

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.
@anatoly-os anatoly-os merged commit eda7a97 into musescore:3.x May 12, 2020
@Jojo-Schmitz
Copy link
Contributor

needed for master too

anatoly-os added a commit that referenced this pull request May 20, 2020
Fix #305209: ticks_f warnings when loading a custom workspace
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