cursor.next hangs when last measure not full
I believe the following is a bug, tho correct me if I am wrong:
cursor.next() in a plugin, if the last measure of the score is not fully filled out with notes (to match the measure's timesig) the cursor 'hangs' at the last measure in the score. Meaning that repeated calls to
cursor.next() have no effect, the cursor simply stays at the same tick.
This is a problem when walking a staff inside a plugin as the ususal method to detect the end of processing doesn't work in this edge case.
Example score and plugin code attached.
First: select measures 10-11 in the test score and run the plugin - all is fine.
Next: Select measures 10-12 and run the plugin and you should see that the watchdog counter trips in the staff-walking loop.
If you inspect the console debug output you can see that the cursor is just not advancing past that final rest in the last measure; thus causing an infinite loop condition.
Note that if the last measure is fully populated with notes all is well, no infinite loop occurs.
The staff walking loop, with relevant debug output, is in the function
makeTAB(). The user's selection range start/end ticks is determined in
QtObject oSelection.storeUserRange(), which does the usual accounting for the 'wrap past last tick = 0' case.
I am using: MuseScore-126.96.36.1998021370-x86_64.AppImage on Linux.