fix #31576: get right clef & key when inserting measures
Merge pull request #1248 from MarcSabatella/31576-insert-measure-key-clef

fix #31576: get right clef & key when inserting measures