rename parts -> missing GUI refresh in tabbar

• Jan 24, 2019 - 22:27
Reported version
3.0
Type
Graphical (UI)
Frequency
Many
Severity
S4 - Minor
Reproducibility
Always
Status
active
Regression
No
Workaround
No
Project

If you change the title of a part (in the part dialog), the tabbar will keep the old one after you hit OK. You need to save and reload the score to make it happen. Nothing really important, but i guess it should work ;)


Comments

This issue is still present in 3.2.3 (OS: macOS 10.14, Arch.: x86_64, MuseScore version (64-bit): 3.2.3.22971, revision: d2d863f)

In addition to this issue, there is one that is to some degree related. If parts are renamed in the Parts dialog and then the user Cancels or closes the dialog box the Part names are actually changed but this may go unnoticed because the TABs don't update to reflect the changed names To reproduce the rename-despite-cancel bug this follow the sequence:
1. Rename one or more parts
2. Cancel (or close the dialog box with hitting OK)
3. Make some change in the Score (to make it "dirty", generate the * next to it's name)
4. Save
5. Close
6. Re-Open
7. The changed part names will be used instead of original names

You can also see the bug if after Cancel (or close) you re-open the Parts dialog box. The changed names will be present instead of the original ones.

Looking at the code, it appears that the issue arises because, at present, the Parts dialog box actually changes the Part names directly when a rename takes place. (It does a setTitle() on an Exceprt object.) The dialog box code needs to avoid setting the title on Except objects until the OK button is pressed.

The two issue are related in that it's because the GUI doesn't show names changes (unless parts are also re-ordered at the same time) that the failure of Cancel to abort the name changes gets missed.