File tree Expand file tree Collapse file tree 1 file changed +13
-8
lines changed
Expand file tree Collapse file tree 1 file changed +13
-8
lines changed Original file line number Diff line number Diff line change @@ -4179,8 +4179,16 @@ bool Score::cmdImplode()
41794179 continue ;
41804180 }
41814181 EngravingItem* dst = s->element (dstTrack);
4182- if (dst && dst->isChord ()) {
4183- Chord* dstChord = toChord (dst);
4182+ // Fix #174111: find first chord across all voices, not just voice 1
4183+ Chord* dstChord = nullptr ;
4184+ for (voice_idx_t i = 0 ; i < VOICES; ++i) {
4185+ EngravingItem* e = s->element (dstTrack + i);
4186+ if (e && e->isChord ()) {
4187+ dstChord = toChord (e);
4188+ break ;
4189+ }
4190+ }
4191+ if (dstChord) {
41844192 // see if we are tying in to this chord
41854193 Chord* tied = 0 ;
41864194 for (Note* n : dstChord->notes ()) {
@@ -4227,15 +4235,12 @@ bool Score::cmdImplode()
42274235 }
42284236 }
42294237 }
4230- // delete chordrest from source track if possible
4231- if (src && src->voice ()) {
4238+ // delete rest from source track if possible
4239+ if (src && src != dstChord && src ->voice ()) {
42324240 undoRemoveElement (src);
42334241 }
42344242 }
4235- }
4236- // TODO - use first voice that actually has a note and implode remaining voices on it?
4237- // see https://musescore.org/en/node/174111
4238- else if (dst) {
4243+ } else if (dst) {
42394244 // destination track has something, but it isn't a chord
42404245 // remove rests from other voices if in "voice mode"
42414246 for (voice_idx_t i = 1 ; i < VOICES; ++i) {
You can’t perform that action at this time.
0 commit comments