get everything mscore3 packaging has to offer into fontx branch
[alioth/musescore.git] / debian / patches / experiments / fix-accidental-paren-pos.diff
1 --- a/libmscore/accidental.cpp
2 +++ b/libmscore/accidental.cpp
3 @@ -284,23 +284,24 @@ void Accidental::layout()
4        setMag(m);
5  
6        m = magS();
7 +      qreal x = 0;
8  
9        if (_bracket != AccidentalBracket::NONE) {
10              SymId id = _bracket == AccidentalBracket::PARENTHESIS ? SymId::accidentalParensLeft : SymId::accidentalBracketLeft;
11              SymElement e(id, 0.0);
12              el.append(e);
13              r |= symBbox(id);
14 +            x += symAdvance(id);
15              }
16  
17        SymId s = symbol();
18 -      qreal x = r.x()+r.width();
19        SymElement e(s, x);
20        el.append(e);
21        r |= symBbox(s).translated(x, 0.0);
22  
23        if (_bracket != AccidentalBracket::NONE) {
24 +            x += symAdvance(s);
25              SymId id = _bracket == AccidentalBracket::PARENTHESIS ? SymId::accidentalParensRight : SymId::accidentalBracketRight;
26 -            x = r.x()+r.width();
27              SymElement e1(id, x);
28              el.append(e1);
29              r |= symBbox(id).translated(x, 0.0);