Plugin is not changing the score if Dialog is used
I have made a plugin that creates notes from Harmony texts (based on the plugin chordsToNotes). It's working good if I don't use a Dialog, it creates all notes (changing the score).
But when I use a (starting) Dialog it run through the code without problem, but nothing happens with the score. I have very detailed logging and all looks fine, it logs exactly the same as if the Dialog isn't used, the code for creating/adding notes are done, but nothing happens with the score.
It's strange, I also tried to do the main logic in
dialog.open(), then it works (but no settings from the Dialog since the code in
onRun doesn't wait for the Dialog to close). It's exactly the same main logic that are called from
onClicked for a Button in the Dialog, but as I wrote, when called from there it runs through the code but nothing is really changed in the score.