get staff from element
I need to know on which staff (treble, bass) an element is on. Unfortunately such a staffIdx seems unobtainable from staff object. I also tried making a list of staffs myself and then comparing element.staff with is() against these entries. problem is, that the staff of notes is wrong. Have a look at this example. Every chord and note in this example has the same staff reference (treble staff) which is clearly wrong. Is there no way to get a staffIdx reliably in current version?
Attachment | Size |
---|---|
Unbenannt.png | 13.16 KB |
Comments
pls try curScore.selection.elements[0].parent.staffMove
staffIdx refers to home staff
related to
https://musescore.org/en/handbook/3/cross-staff-notation
https://musescore.org/en/node/354808