[1.0] Brackets on accidentals not saved (with code change)
Looks like the fix to #8727: [1.0] Crash when saving score with displaced parethesized accidentals broke saving accidental brackets.
In a new file, enter two notes (g and a)
select g and press up (it gets a sharp)
drag a sharp from the palette to the a
drag round brackets from the palette to both sharps
Save file in mscx format. After loading this file the brackets are missing.
Note: brackets are not exported to MusicXML either.
Screenshot (before saving) and file saved attached.
Attachment | Size |
---|---|
AccidentalsWithBrackets.png | 61.09 KB |
AccidentalsWithBrackets.mscx | 3.43 KB |
Comments
Confirmed in rev. 3942. Priority increased as it causes data to be lost.
M.
I think the problem is in function
void Note::write() const
in file note.cpp, line 561-2:if (_accidental && (!_accidental->userOff().isNull() || !_accidental->visible())
should read:
if (_accidental && (!_accidental->userOff().isNull() || !_accidental->visible() || _accidental->hasBracket())
This is a minimalistic change. A possibly better approach could be to let the accidental itself to decide if it is customized or not:
if (_accidental && _accidental->hasProperties())
providing a suitable
Accidental::hasProperties()
(or however named) function.M.
The minimalistic aproach is ok. The trunk unconditionally writes out the accidental.
This is fixed in r3945.
Automatically closed -- issue fixed for 2 weeks with no activity.