Page Settings, Apply to All Parts glitches

• Mar 10, 2019 - 19:14
Reported version
S3 - Major

1) Open the attached score (don't worry about how weird it looks, it's for animating a drum machine).
2) File menu, Parts... New All, then OK. That will generate tabs for the score and 11 parts.
3) Format menu, Page Settings..., change portrait to landscape (any change will do)
4) Click the Apply to All Parts button.
5) In Ubuntu, on my i5 desktop, the dialog disappears behind the main MuseScore application window for several seconds, and the OS flashes a "MuseScore is not responding, do you want to force quite or wait?" message, then the dialog reappears and all is normal.
In Windows 10, on the same desktop machine, the MuseScore taskbar icon blinks a few times, and the dialog is frozen while it processes. Not nearly as bad as Ubuntu.

The button works, but it can scare a user, and on Ubuntu might even cause the user to force quit the MuseScore app. The attached score is not that big. 11 staves is not that many. This is probably worse with bigger scores.

Attachment Size
BIYH_Grid302.mscz 39.01 KB


This code sets the styles/properties of each part's score, then does a new layout of the score. Somewhere in there it seems to be setting the focus to the application window, away from the dialog box. Then the dialog box gets the focus back when it's done.

The problem is caused by these two lines of code inside ScoreAccessibility::updateAccessibilityInfo()

This is called for each part by MScore::endCmd().
Why must this happen in ScoreAccessibility? Is there a way around it when a dialog is open maybe, to alleviate this issue?

Git Blame says that this code is 4 and 5 years old:……

Status active PR created

This is greatly alleviated in this PR, which should be merged this Wednesday:
On Ubuntu, the dialog disappears for a blip, less than a second. There are no "not responding" messages.
On Windows there is only one blink of the app icon in the taskbar.
I don't know if this is fixed, but I think that it is. The remaining problem is the code in ScoreAccessibility. That first command, activateWindow(), was added to "Fix palette taking keyboard focus." - might there be a better way to do that 4 years later?
IMO that is a separate issue to be created, if necessary.