From 9944696e6ed291a36ba431c00f6e72365a8f2c78 Mon Sep 17 00:00:00 2001 From: Christian Kosman Date: Sat, 3 Sep 2022 11:31:52 -0700 Subject: [PATCH] Check note data key in dict before adding --- SliceDetails/SliceRecorder.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/SliceDetails/SliceRecorder.cs b/SliceDetails/SliceRecorder.cs index dec69d9..e1adcca 100644 --- a/SliceDetails/SliceRecorder.cs +++ b/SliceDetails/SliceRecorder.cs @@ -74,7 +74,10 @@ private void ProcessNote(NoteController noteController, NoteCutInfo noteCutInfo) NoteInfo noteInfo = new NoteInfo(noteController.noteData, noteCutInfo, cutAngle, cutOffset, noteGridPosition, noteIndex); - _noteSwingInfos.Add(noteController.noteData, noteInfo); + if (!_noteSwingInfos.ContainsKey(noteController.noteData)) + { + _noteSwingInfos.Add(noteController.noteData, noteInfo); + } } public void ScoringForNoteFinishedHandler(ScoringElement scoringElement) {