FireFox2000000 / Moonscraper-Chart-Editor

BSD 3-Clause "New" or "Revised" License
225 stars 61 forks source link

Band-aid fix for lyric editor throwing an exception when re-opening with an incomplete phrase #114

Closed TheNathannator closed 1 year ago

TheNathannator commented 1 year ago

Separated out from #113 at FireFox's request; not a permanent solution

Fix the lyric editor throwing an exception if it was closed before finishing a phrase, and then re-opened.

I'm not sure if the fix I did was ideal lol, I'm unfamiliar with the lyric editor so I went with the easiest option and it seems to work fine. The problem has to do with the controller of the final phrase in the list never getting its phraseEndEvent initialized with an actual event in this scenario, so PickupPhraseEnd never receives a command instance and fails.

FireFox2000000 commented 1 year ago

Non-bandaid fix implemented in https://github.com/FireFox2000000/Moonscraper-Chart-Editor/commit/b85f62a0d32f000e68226ce9c25ea9c26ddc1111