public void executeAction() { measure.ModelCollection.performActionOnSpecificItems( c => c.Position.Index == chords.First().Position.Index, c => c.breakMultiEffectsAtPosition(EffectPosition.Into)); measure.ModelCollection.performActionOnSpecificItems( c => c.Position.Index >= chords.First().Position.Index, c => c.Position.Index += chords.Count); foreach (Chord chord in chords) { measure.Add(chord); (chord.Position as MultiPosition)?.setMeasureReference(measure.Position); } }
public void executeAction() { measure.ModelCollection.performActionOnSpecificItems( c => c.Position.Index == chord.Position.Index, c => c.breakMultiEffectsAtPosition(EffectPosition.Into)); measure.ModelCollection.performActionOnSpecificItems( c => c.Position.Index == chord.Position.Index - 1, c => c.breakMultiEffectsAtPosition(EffectPosition.After)); measure.ModelCollection.performActionOnSpecificItems( c => c.Position.Index >= chord.Position.Index, c => c.Position.Index += 1); measure.Add(chord); (chord.Position as MultiPosition)?.setMeasureReference(measure.Position); }