When a staff type change is undone, the previous staff clef is not restored, if it has been changed to suit the new staff type.
Fixed by storing the original initial clef and restoring it on undo. Should fix the following issues: #18869, #23374, #24294 and, possibly others too.
- Added to ChangeStaffType class an initialClef member variable to hold the original staff initial clef type list.
- ChangeStaffType::flip() split into undo() and redo(), as the managing the clef and setting the staff type must be applied in reversed order in the two cases.
- Clef::layout() now hides a clef not compatible with the staff group, if the clef is not generated or changes it to the same clef as the staff initial clef if generated
- TAB ad-hoc code in Clef::layout() to check for compatibility between the clef type and the staff group generalized to all groups removed.
- Fixed GuitarPro test reference scores, which all contained wrong clefs for the TAB staves.
Tested with a few 2.0 and 1.3 scores; more tests are probably necessary.
Note: since the recent re-factoring of StaffType, all the GuitarPro tests were loading the wrong tablature template (as the == test in Staff::setStaffStyle() was wrong) and have been too quickly updated to accept this.
This reverts the tests to the status before the StaffType re-factoring.