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
12.23k stars 2.65k forks source link

Figured bass text is not updated on undo #20159

Open miiizen opened 11 months ago

miiizen commented 11 months ago

Issue type

Engraving bug (incorrect score rendering)

Bug description

Undoing an edit on a figured bass item only shows the updated text once editing is started again

Steps to reproduce

  1. Add a figured bass element and enter a number
  2. Edit the figured bass again and add a character
  3. Stop editing and try to undo. There is no change
  4. Double click to start editing again, observe the change

Screenshots/Screen recordings

https://github.com/musescore/MuseScore/assets/26510874/180dd21e-8dce-43e9-8dc2-cefff06dc102

MuseScore Version

4.2.0

Regression

No.

Operating system

macOS 13.5

Additional context

To lay out figured bass, a FiguredBassItem object is created for each line, and each line laid out separately. FiguredBassItem is sort of an unfinished EngravingItem - lots of the properties are completely unused in favour of deleting these items and recreating from scrach every time the figured bass is edited. This isn't every undo-friendly. I'd say it probably doesn't fit in very well with our new layout system and could do with a rethink and rework one day.

Jojo-Schmitz commented 11 months ago

Same in Mu3