Staff space changed without reason when opening a MuseScore3 file.
Reported version
4.x-dev
Type
Functional
Frequency
Once
Severity
S3 - Major
Reproducibility
Always
Status
needs info
Regression
No
Workaround
No
Project
1) Open a MuseScore3 file (e.g. beam-shift.mscz).
2) Select a note.
3) Deselect the note by clicking somewhere outside the measure.
Expected behavior:
Note deselected.
Observed behavior:
Note deselected and score changed.
Attachment | Size |
---|---|
beam-shift.mscz | 2.62 KB |
Comments
The Score Comparison Tool, comparing the current with the last saved version, shows
spatium
is changed from 1.76389 in the original file into 1.764, which is on the inspector.Worth pinging @sideways on this, he did a ton of work that was never merged having to do with these sorts of roundoff errors.
I know that discussion, had a look into it myself too. It seems to me the main issue here is the
QDoubleSpinBox
which, at least for me, has a fundamental flaw. You can put any anydouble
into the widget but it isn't storing thedouble
as adouble
but as astring
. So, when retrieving the value, you will get a, slightly, different value, even when nobody actually changed the value. In my professional life we had a lot of problems with this, causing unstable results, flipping between two values.I didn't had a look into this particular issue yet but it might the new model/view approach could be our rescue. Just save the data in the original format and use a different display value (the string). This solves the flaw in the spinbox.
I am unable to reproduce this on a 2022-01-10 4.x nightly on macOS. Can you verify if the issue still exists for you? If not, we can close it.