musescore / MuseScore

MuseScore is an open source and free music notation software. For support, contribution, bug reports, visit MuseScore.org. Fork and make pull requests!
https://musescore.org
Other
12k stars 2.59k forks source link

[MU4 Issue] hiding instrument in instruments panel creates extra undo stack(s) #13748

Open sammik opened 1 year ago

sammik commented 1 year ago

Describe the bug If hide instrument in Instruments panel, it creates extra empty undo(s). User needs to press undo 2 or 3 times to show instrument back.

To Reproduce Steps to reproduce the behavior:

  1. Click visibility icon ("eye") at instruments panel to hide instrument
  2. Click undo
  3. Instrument is still hidden, extra undo is needed

or

  1. Click visibility icon ("eye") at instruments panel to hide instrument
  2. Click it again to show instrument
  3. Click undo - instrument hides - OK
  4. Click undo again - nothing happens, extra 2 undos needed to show instrument

Expected behavior One undo is enough.

Screenshots

https://user-images.githubusercontent.com/1646034/195701124-ef9ae4a3-098c-4367-af93-b5da3e03f6d2.mp4

Platform information

Additional context Extra undo(s) are needed only for showing instrument (revert hiding). Hiding (revert showing) works as expected.

scoutskylar commented 1 year ago

Additionally, performing only one undo causes the visibility buttons in the Instruments panel to stop working, leaving the instrument hidden regardless of what the user does unless another undo is performed. Upon saving the score and restarting Musescore, it is impossible to show the instrument on the part again without deleting the part and re-adding the desired instruments. Reproducible as of Musescore 4.0.1 for Windows 11.

avvvvve commented 11 months ago

The number of undo steps created appears to be the number of staves the instrument has + 1. For example, if I have an instrument with 6 staves, I have to press undo 7 times (one for each stave and one for the instrument itself).