Edited final barlines become single after saving and loading a score

• Jun 13, 2018 - 10:09
Reported version
3.0
Type
Functional
Severity
S4 - Minor
Status
closed
Project

Steps to reproduce:
Short option:
1. Just open in MuseScore compat206/barlines.mscx and compat206/barlines-ref.mscx from mtest/libmscore and compare final barlines at the end of each score.

Long option:
1. Create a score
2. Click on a final barline and edit any of its properties (e.g. toggle its visibility/automatic placement)
3. Save the score
4. Reload the score
5. See that final barlines are not double anymore.

Reason
The reason why it happens is in these lines which define the default value for BARLINE_TYPE property for reading/writing purposes. The problem is that this value differs when reading and when writing a barline since on the reading stage it is even not attached to segment, or, more globally, it cannot be currently determined whether this barline is final or not. So when writing a barline the default type for final barlines is BarLineType::END but when reading them it equals to BarLineType::NORMAL so a wrong type may be assigned for barlines that are explicitly written to the file. Making that default be equal BarLineType::NORMAL regardless of position of a barline would solve the problem but I am not sure that this is desirable so opened this issue.

MuseScore 2 is not affected by this issue since it always writes a barline type if it writes the barline itself.


Comments