fix #40146: Crash on changing rest duration
fix #36901: Select two Time Signatures, Delete, and Undo, causes crash