If a linked staff of a different type/group is added to the score, the new staff is not completely laid out.
Fixes:
- Default clef of new staff is copied from default clef of original staff, rather than from its actual clef.
- When score instruments are updated, notes are updated before laying out chords, as chords need to have notes in correct position to compute correct stems, ledger lines, etc.
- Notes are updated via Score::cmdUpdateNotes() rather Score::updateNotes(), as the latter does not deals with the specifics of staff groups.
- cloneStaff() only clones clefs which do not alread exist AND are compatible with the staff group.
- cloneStaff() also updates the staff clef map when cloning a clef.
In the instrument wizard, when a staff is changed to standard type (from a previous different type), the standard clef of the istrument is lost.
Changes:
- Added a member variable to `StaffListItem` storing the default standard clef for the instrument.
- Modified `instruments.xml' to remove <clef> tags from tablature instrument definitions: all these instruments are inited from a standard-staff main entry, recording the default standard clef; this clef is used to init the `StaffListItem::_defaultClef` member variable.
NOTE: Percussion instruments are not covered (an number of percussion instruments seem to have old-style definitions in `instruments.xml`); conversion from percussion to standard staff may yield unexpected results.
Renames also the files hoding the class itself:
- libmscore/tablature.cpp => stringdata.cpp
- libmscore/tablature.h => stringdata.h
No actual change in the code, only updated references to stringdata.h in #include's.