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: allow the import of gpx files that use displayScale as Float xml node #1243

Merged
merged 1 commit into from
Sep 9, 2023

Conversation

allandiego
Copy link
Contributor

@allandiego allandiego commented Aug 7, 2023

Fix the import of some gpx files that uses Float instead Double node on XProperties

Example of gpx xml part that was throwing error

<Bar id="29">
  <Clef>G2</Clef>
  <Voices>26 -1 -1 -1</Voices>
  <XProperties>
    <XProperty id="1124139520">
      <Float>1.07818</Float>
    </XProperty>
  </XProperties>
</Bar>

Issues

I was trying to import a gpx file with an error, tracing the error I found that was due to a child node from XProperties that the importer only looks for the Double node, but I found out in gpx that it can also be Float

Proposed changes

Look for both nodes types (Double and Float) to get the bar scale value

Checklist

  • I consent that this change becomes part of alphaTab under it's current or any future open source license
  • Changes are implemented
  • Existing builds tests pass
  • New tests were added

Further details

  • This is a breaking change
  • This change will require update of the documentation/website

… node instead Double

Fix the import of some gpx files that uses <Float>instead <Double> node on XProperties

Example
```xml
<Bar id="29">
  <Clef>G2</Clef>
  <Voices>26 -1 -1 -1</Voices>
  <XProperties>
    <XProperty id="1124139520">
      <Float>1.07818</Float>
    </XProperty>
  </XProperties>
</Bar>
```
@Danielku15 Danielku15 merged commit b7dec4e into CoderLine:develop Sep 9, 2023
4 checks passed
@Danielku15
Copy link
Member

Thanks for your contribution.

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.

None yet

2 participants