Changes to advanced style properties in tablature causes clef in Instruments to change

• Aug 19, 2014 - 22:14
Reported version
3.0
Priority
P1 - High
Type
Functional
Frequency
Many
Severity
S3 - Major
Reproducibility
Always
Status
active
Regression
No
Workaround
No
Project

1. Create tablature score.
2. Right-click stave.
3. 'Stave Properties…'.
4. 'Advanced style properties...'.
5. Change something with a tickbox or radio button (e.g. 'Show time signature').
6. 'OK' twice.
7. 'Instruments...'.

Expected result: Clef: 'Tablature'.
Actual result: Clef: 'Treble clef 8vb'.

Note: It doesn't seem reproducible if changing something with Up/Down buttons or a drop-down list.

Using MuseScore 2.0 Nightly Build (7cd411a) - Mac 10.7.5.


Comments

Possibly related: piano scores created in 1.3 come in showing "treble" for both staves when you look at the Instruments dialog. The actual clefs in the score are fine; the Instruments dialog just lies about this. I guess it's showing something about the default clef for the instrument rather than the actual clef.

This in turn makes me question whether it is worth even showing the clef in the instruments dialog. All it does is crowd out the more interesting into - staff type. And given the number of bugs we've seen in the display of this info...

Status fixed active

Infortunately not fixed with 116866d
The TAB clef reverts to treble clef 8vb in Instruments dialog after a setting change in Advanced style properties.

I've almost pinned it down, but I am struggling with the fix. Here's what happens:
1. After performing the above steps, the staffType of the instrument becomes a "Custom Tablature" -- see https://github.com/musescore/MuseScore/blob/master/mscore/instrwidget.c… because it doesn't match any of the presets.
2. Upon updating the clefs-- https://github.com/musescore/MuseScore/blob/master/mscore/instrwidget.c… --it first needs to find the staffTypeIdx
3. The StaffListItem::staffTypeIdx()-- https://github.com/musescore/MuseScore/blob/master/mscore/instrwidget.c… --finds the data linked to the currently selected item in _staffTypeCombo.
4. However, the data linked to the "Custom Tablature" is 0. And when that goes through https://github.com/musescore/MuseScore/blob/master/libmscore/stafftype… , it returns a standard staff.
5. Finally, since the default of guitar is Treble Clef 8vb, it displays that. And upon accepting, it updates the score. (EDIT: after making a fix that shows the correct clef, the score still updated to the wrong clef--looking into it)

After that, I am not sure what to do.