Lyrics added by Plugin won't show up until I press Ctrl+L
I'm currently writing a lyrics input helper for East Asian languages, which reads a .txt or .lrc file and let user input lyrics thru a pannel (whether single character, prolong the syllables like input "_", or fill multiple char in a single notes). I have some problems relate to adding the lyrics to the note. When I add lyrics thru my plugin using this code (learned from notenames-as-lyrics plugin):
var fill = newElement(Element.LYRICS); fill.text = character; //character is the lyrics text to be added fill.voice = cursor.voice; cursor.element.add(fill);
The lyrics does not appear automatically at the curosr. However, when I press Ctrl+L or slightly drag the note's position, the lyrics will suddenly appear at the wished spot, seems there are some refreshing issues. I compared my code to the lyrics adding part of other people's work, I couldn't find anything different methodically. Anybody knows the reason of why this happened and what did I do wrong? Thank you so much!
Comments
Wrapping it in a
might help
In reply to Wrapping it in a startCmd()… by Jojo-Schmitz
THAT WORKS LIKE A CHARM!!!!
Thank you for solving a problem that I was stucked on for 5 hours!