From d6215bdd267124b33adc561325ff1ada622adcb1 Mon Sep 17 00:00:00 2001 From: oxygen-dioxide <54425948+oxygen-dioxide@users.noreply.github.com> Date: Fri, 13 Oct 2023 23:39:13 +0800 Subject: [PATCH] ctrl-click to add note into selection without deselect the other notes --- OpenUtau/ViewModels/NotesViewModel.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/OpenUtau/ViewModels/NotesViewModel.cs b/OpenUtau/ViewModels/NotesViewModel.cs index 07f2d4605..64ee78259 100644 --- a/OpenUtau/ViewModels/NotesViewModel.cs +++ b/OpenUtau/ViewModels/NotesViewModel.cs @@ -511,17 +511,24 @@ public void DeselectNotes() { } public void ToggleSelectNote(UNote note) { + /// + /// Change the selection state of a note without affecting the selection state of the other notes. + /// Add it to selection if it isn't selected, or deselect it if it is already selected. + /// if (Part == null) { return; } if (Selection.Contains(note)) { DeselectNote(note); } else { - SelectNote(note); + SelectNote(note, false); } } public void SelectNote(UNote note) { + /// + /// Select a note and deselect all the other notes. + /// SelectNote(note, true); } public void SelectNote(UNote note, bool deselectExisting) {