SortingInserter may, depending on the implementation of priority_queue, sort events with equal time incorrectly. With priority_queue from GCC 4.5.3 on MIDI export I get note off events after note on events for following notes, which leads to zero length notes when >2 notes back to back have equal pitch. This problem might be related to ticket #1359.
Fix is attached
Did we ever do anything with this patch, Daniel? It doesn't apply cleanly almost a year later, and it could be somebody came up with a different solution to the problem, or it could be it just got lost, ignored, and rendered incompatible with current Rosegarden through our neglect. I was experiencing a very severe personal crisis when you submitted this.
Tom Breton came up with a different solution in SVN r13172.