|
35 | 35 | #include "articulation.h" |
36 | 36 | #include "beam.h" |
37 | 37 | #include "chordline.h" |
| 38 | +#include "dom/parenthesis.h" |
38 | 39 | #include "drumset.h" |
39 | 40 | #include "factory.h" |
40 | 41 | #include "guitarbend.h" |
|
64 | 65 | #include "tremolotwochord.h" |
65 | 66 | #include "trill.h" |
66 | 67 | #include "tuplet.h" |
| 68 | +#include "utils.h" |
67 | 69 |
|
68 | 70 | #ifndef ENGRAVING_NO_ACCESSIBILITY |
69 | 71 | #include "accessibility/accessibleitem.h" |
@@ -1252,6 +1254,11 @@ void Chord::scanElements(std::function<void(EngravingItem*)> func) |
1252 | 1254 | for (EngravingItem* e : el()) { |
1253 | 1255 | e->scanElements(func); |
1254 | 1256 | } |
| 1257 | + |
| 1258 | + for (auto& p : m_noteParens) { |
| 1259 | + p.first.first->scanElements(func); |
| 1260 | + p.first.second->scanElements(func); |
| 1261 | + } |
1255 | 1262 | ChordRest::scanElements(func); |
1256 | 1263 | } |
1257 | 1264 |
|
@@ -2106,36 +2113,6 @@ void Chord::requestShowStemSlash(bool show) |
2106 | 2113 | // sortNotes |
2107 | 2114 | //--------------------------------------------------------- |
2108 | 2115 |
|
2109 | | -static bool noteIsBefore(const Note* n1, const Note* n2) |
2110 | | -{ |
2111 | | - const int l1 = n1->line(); |
2112 | | - const int l2 = n2->line(); |
2113 | | - if (l1 != l2) { |
2114 | | - return l1 > l2; |
2115 | | - } |
2116 | | - |
2117 | | - const int p1 = n1->pitch(); |
2118 | | - const int p2 = n2->pitch(); |
2119 | | - if (p1 != p2) { |
2120 | | - return p1 < p2; |
2121 | | - } |
2122 | | - |
2123 | | - if (n1->tieBack()) { |
2124 | | - if (n2->tieBack() && !n2->incomingPartialTie()) { |
2125 | | - const Note* sn1 = n1->tieBack()->startNote(); |
2126 | | - const Note* sn2 = n2->tieBack()->startNote(); |
2127 | | - if (sn1->chord() == sn2->chord()) { |
2128 | | - return sn1->unisonIndex() < sn2->unisonIndex(); |
2129 | | - } |
2130 | | - return sn1->chord()->isBefore(sn2->chord()); |
2131 | | - } else { |
2132 | | - return true; // place tied notes before |
2133 | | - } |
2134 | | - } |
2135 | | - |
2136 | | - return false; |
2137 | | -} |
2138 | | - |
2139 | 2116 | void Chord::sortNotes() |
2140 | 2117 | { |
2141 | 2118 | std::sort(notes().begin(), notes().end(), noteIsBefore); |
|
0 commit comments