GSoC 2020: Tree Model - Week 7 (finished scanElements refactoring)

Posted 9 months ago

Hello MuseScore blog readers!

Work done last week

Since my last blog on Wednesday, I have made some final changes to my PR and addressed all the review comments.

I tried testing the application after all the changes were made, and although 99% of the things seemed to be working fine I noticed a few small bugs and a bit bigger one.

The smaller bugs were related to the palette, some elements like spanners, glissandos and fret diagrams were not showing up there, which I fixed easily.

The major bug was that I wasn't able to see some of the vtest scores when I opened them. I had assumed that something had gone wrong due to my changes, but while debugging I realised that the problem actually isn't because of my code but it was already there in the 4.x branch.

So I submitted the bug report and very soon @mattmcclinch submitted a PR for it, even before I could get a chance to debug it properly ;-)

Finally, I have removed the [WIP] label from my PR and now I consider it to be done. I haven't noticed any other bugs while testing.

The plan ahead

I will now move on to the next part of my project, which will be refactoring of the read/write code using the tree model.

As I had mentioned in my original project proposal, this will have several benefits like:

  1. There will be a lot less duplication of code, and the code will become more systematic.
  2. The new code will be easily extensible.
  3. Code for read and write will remain in sync, and there will be fewer chances of bugs.

Also since there is a new major release coming up so I also see the opportunity to make changes to the file format if we find it suitable, though I plan to keep everything mostly the same.

Other links

Pull request:
Previous blog:…