@@ -39,7 +39,7 @@ void EditChord::addChordParentheses(Chord* chord, std::vector<Note*> notes, bool
3939 if (notes.empty ()) {
4040 return ;
4141 }
42- undoAddParensToNotes (chord, notes, addToLinked, generated);
42+ undoAddParenthesesToNotes (chord, notes, addToLinked, generated);
4343}
4444
4545void EditChord::removeChordParentheses (Chord* chord, std::vector<Note*> notes, bool addToLinked, bool generated)
@@ -51,7 +51,7 @@ void EditChord::removeChordParentheses(Chord* chord, std::vector<Note*> notes, b
5151 std::map<const NoteParenthesisInfo*, std::vector<Note*> > notesByGroup;
5252
5353 for (Note* n : notes) {
54- const NoteParenthesisInfo* noteParenInfo = chord->findNoteParenInfo (n);
54+ const NoteParenthesisInfo* noteParenInfo = chord->findNoteParenthesisInfo (n);
5555 if (!noteParenInfo) {
5656 continue ;
5757 }
@@ -72,7 +72,7 @@ void EditChord::removeChordParentheses(Chord* chord, std::vector<Note*> notes, b
7272 const NoteParenthesisInfo* parenInfo = groupNotesPair.first ;
7373 if (parenInfo->notes ().size () == groupNotesPair.second .size ()) {
7474 // All notes marked for paren removal, clear parentheses group
75- undoClearParenGroup (chord, parenInfo->notes (), parenInfo->leftParen (), parenInfo->rightParen (), addToLinked);
75+ undoClearParenthesisGroup (chord, parenInfo->notes (), parenInfo->leftParen (), parenInfo->rightParen (), addToLinked);
7676 continue ;
7777 }
7878
@@ -81,7 +81,7 @@ void EditChord::removeChordParentheses(Chord* chord, std::vector<Note*> notes, b
8181 noteIterator = std::next (noteIterator)) {
8282 // Remove paren from single note and create new paren group for all notes below
8383 Note* note = *noteIterator;
84- const NoteParenthesisInfo* curParenInfo = note->parenInfo ();
84+ const NoteParenthesisInfo* curParenInfo = note->parenthesisInfo ();
8585 const std::vector<Note*> notesList = curParenInfo->notes ();
8686 Parenthesis* leftParen = curParenInfo->leftParen ();
8787 Parenthesis* rightParen = curParenInfo->rightParen ();
@@ -93,24 +93,24 @@ void EditChord::removeChordParentheses(Chord* chord, std::vector<Note*> notes, b
9393
9494 for (Note* noteToRemove : newNoteGroup) {
9595 if (curParenInfo->notes ().size () == 1 ) {
96- undoClearParenGroup (chord, { noteToRemove }, leftParen, rightParen, addToLinked);
96+ undoClearParenthesisGroup (chord, { noteToRemove }, leftParen, rightParen, addToLinked);
9797 } else {
98- undoRemoveParenFromNote (chord, noteToRemove, leftParen, addToLinked);
98+ undoRemoveParenthesesFromNote (chord, noteToRemove, leftParen, addToLinked);
9999 }
100100 }
101101
102- undoAddParensToNotes (chord, newNoteGroup, addToLinked, generated);
102+ undoAddParenthesesToNotes (chord, newNoteGroup, addToLinked, generated);
103103 }
104104 if (curParenInfo->notes ().size () == 1 ) {
105- undoClearParenGroup (chord, { note }, leftParen, rightParen, addToLinked);
105+ undoClearParenthesisGroup (chord, { note }, leftParen, rightParen, addToLinked);
106106 } else {
107- undoRemoveParenFromNote (chord, note, leftParen, addToLinked);
107+ undoRemoveParenthesesFromNote (chord, note, leftParen, addToLinked);
108108 }
109109 }
110110 }
111111}
112112
113- void EditChord::undoAddParensToNotes (Chord* chord, std::vector<Note*> notes, bool addToLinked, bool generated)
113+ void EditChord::undoAddParenthesesToNotes (Chord* chord, std::vector<Note*> notes, bool addToLinked, bool generated)
114114{
115115 track_idx_t track = chord->track ();
116116 Parenthesis* leftParen = Factory::createParenthesis (chord);
@@ -157,16 +157,16 @@ void EditChord::undoAddParensToNotes(Chord* chord, std::vector<Note*> notes, boo
157157 }
158158}
159159
160- void EditChord::undoRemoveParenFromNote (Chord* chord, Note* note, Parenthesis* leftParen, bool removeFromLinked)
160+ void EditChord::undoRemoveParenthesesFromNote (Chord* chord, Note* note, Parenthesis* leftParen, bool removeFromLinked)
161161{
162162 if (!removeFromLinked) {
163- doRemoveSingleNoteParen (chord, note, leftParen);
163+ doRemoveSingleNoteParenthesis (chord, note, leftParen);
164164 return ;
165165 }
166166
167167 for (EngravingObject* linkedObject : chord->linkList ()) {
168168 if (linkedObject == chord) {
169- doRemoveSingleNoteParen (chord, note, leftParen);
169+ doRemoveSingleNoteParenthesis (chord, note, leftParen);
170170 continue ;
171171 }
172172
@@ -178,24 +178,24 @@ void EditChord::undoRemoveParenFromNote(Chord* chord, Note* note, Parenthesis* l
178178 }
179179 Note* linkedNote = toNote (note->findLinkedInStaff (linkedStaff));
180180
181- const NoteParenthesisInfo* noteParenInfo = linkedChord->findNoteParenInfo (linkedNote);
181+ const NoteParenthesisInfo* noteParenInfo = linkedChord->findNoteParenthesisInfo (linkedNote);
182182 if (noteParenInfo) {
183- doRemoveSingleNoteParen (linkedChord, linkedNote, linkedLeftParen);
183+ doRemoveSingleNoteParenthesis (linkedChord, linkedNote, linkedLeftParen);
184184 }
185185 }
186186}
187187
188- void EditChord::undoClearParenGroup (Chord* chord, std::vector<Note*> notes, Parenthesis* leftParen, Parenthesis* rightParen,
189- bool removeFromLinked)
188+ void EditChord::undoClearParenthesisGroup (Chord* chord, std::vector<Note*> notes, Parenthesis* leftParen, Parenthesis* rightParen,
189+ bool removeFromLinked)
190190{
191191 if (!removeFromLinked) {
192- doRemoveAllNoteParens (chord, leftParen);
192+ doRemoveAllNoteParentheses (chord, leftParen);
193193 return ;
194194 }
195195
196196 for (EngravingObject* linkedObject : chord->linkList ()) {
197197 if (linkedObject == chord) {
198- doRemoveAllNoteParens (chord, leftParen);
198+ doRemoveAllNoteParentheses (chord, leftParen);
199199 continue ;
200200 }
201201
@@ -214,25 +214,25 @@ void EditChord::undoClearParenGroup(Chord* chord, std::vector<Note*> notes, Pare
214214 linkedNotes.push_back (linkedNote);
215215 }
216216
217- doRemoveAllNoteParens (linkedChord, linkedLeftParen);
217+ doRemoveAllNoteParentheses (linkedChord, linkedLeftParen);
218218 }
219219}
220220
221221void EditChord::doAddNoteParentheses (Chord* chord, std::vector<Note*> notes, Parenthesis* leftParen, Parenthesis* rightParen)
222222{
223223 NoteParenthesisInfo* parenInfo = new NoteParenthesisInfo (leftParen, rightParen, notes);
224224 if (leftParen->generated ()) {
225- chord->addNoteParenInfo (parenInfo);
225+ chord->addNoteParenthesisInfo (parenInfo);
226226 } else {
227227 Score* score = chord->score ();
228228 score->undo (new AddNoteParenthesisInfo (chord, parenInfo));
229229 }
230230}
231231
232- void EditChord::doRemoveSingleNoteParen (Chord* chord, Note* note, Parenthesis* leftParen)
232+ void EditChord::doRemoveSingleNoteParenthesis (Chord* chord, Note* note, Parenthesis* leftParen)
233233{
234234 if (leftParen->generated ()) {
235- chord->removeNoteFromParenInfo (note, leftParen);
235+ chord->removeNoteFromParenthesisInfo (note, leftParen);
236236
237237 chord->triggerLayout ();
238238 } else {
@@ -241,19 +241,19 @@ void EditChord::doRemoveSingleNoteParen(Chord* chord, Note* note, Parenthesis* l
241241 }
242242}
243243
244- void EditChord::doRemoveAllNoteParens (Chord* chord, Parenthesis* leftParen)
244+ void EditChord::doRemoveAllNoteParentheses (Chord* chord, Parenthesis* leftParen)
245245{
246246 if (leftParen->generated ()) {
247- const NoteParenthesisInfo* noteParenInfo = chord->findNoteParenInfo (leftParen);
247+ const NoteParenthesisInfo* noteParenInfo = chord->findNoteParenthesisInfo (leftParen);
248248
249- chord->removeNoteParenInfo (noteParenInfo);
249+ chord->removeNoteParenthesisInfo (noteParenInfo);
250250 // ! HACK: don't delete as it may still be used in Inspector - see Score::doUndoRemoveElement
251251 // delete noteParenInfo
252252
253253 chord->triggerLayout ();
254254 } else {
255255 Score* score = chord->score ();
256- NoteParenthesisInfo* noteParenInfo = chord->findNoteParenInfo (leftParen);
256+ NoteParenthesisInfo* noteParenInfo = chord->findNoteParenthesisInfo (leftParen);
257257
258258 score->undo (new RemoveNoteParenthesisInfo (chord, noteParenInfo));
259259 }
@@ -327,14 +327,14 @@ void ChangeSpanArpeggio::flip(EditData*)
327327
328328void AddNoteParenthesisInfo::redo (EditData*)
329329{
330- m_chord->addNoteParenInfo (m_noteParenInfo);
330+ m_chord->addNoteParenthesisInfo (m_noteParenInfo);
331331
332332 m_chord->triggerLayout ();
333333}
334334
335335void mu::engraving::AddNoteParenthesisInfo::undo (EditData*)
336336{
337- m_chord->removeNoteParenInfo (m_noteParenInfo);
337+ m_chord->removeNoteParenthesisInfo (m_noteParenInfo);
338338
339339 m_chord->triggerLayout ();
340340}
@@ -349,14 +349,14 @@ void AddNoteParenthesisInfo::cleanup(bool undo)
349349
350350void RemoveNoteParenthesisInfo::redo (EditData*)
351351{
352- m_chord->removeNoteParenInfo (m_noteParenInfo);
352+ m_chord->removeNoteParenthesisInfo (m_noteParenInfo);
353353
354354 m_chord->triggerLayout ();
355355}
356356
357357void RemoveNoteParenthesisInfo::undo (EditData*)
358358{
359- m_chord->addNoteParenInfo (m_noteParenInfo);
359+ m_chord->addNoteParenthesisInfo (m_noteParenInfo);
360360
361361 m_chord->triggerLayout ();
362362}
@@ -371,14 +371,14 @@ void RemoveNoteParenthesisInfo::cleanup(bool undo)
371371
372372void RemoveSingleNoteParentheses::redo (EditData*)
373373{
374- m_chord->removeNoteFromParenInfo (m_note, m_paren);
374+ m_chord->removeNoteFromParenthesisInfo (m_note, m_paren);
375375
376376 m_chord->triggerLayout ();
377377}
378378
379379void RemoveSingleNoteParentheses::undo (EditData*)
380380{
381- m_chord->addNoteToParenInfo (m_note, m_paren);
381+ m_chord->addNoteToParenthesisInfo (m_note, m_paren);
382382
383383 m_chord->triggerLayout ();
384384}
0 commit comments