Skip to content

Fix: allow the import of gpx files that use displayScale as Float xml node#1243

Merged
Danielku15 merged 1 commit into
CoderLine:developfrom
allandiego:develop
Sep 9, 2023
Merged

Fix: allow the import of gpx files that use displayScale as Float xml node#1243
Danielku15 merged 1 commit into
CoderLine:developfrom
allandiego:develop

Conversation

@allandiego
Copy link
Copy Markdown
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
@Danielku15
Copy link
Copy Markdown
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.

2 participants