Skip to content

Commit

Permalink
ctrl-click to add note into selection without deselect the other notes
Browse files Browse the repository at this point in the history
  • Loading branch information
oxygen-dioxide committed Oct 13, 2023
1 parent 0eac6f4 commit d6215bd
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion OpenUtau/ViewModels/NotesViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -511,17 +511,24 @@ public void DeselectNotes() {
}

public void ToggleSelectNote(UNote note) {
/// <summary>
/// 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.
/// </summary>
if (Part == null) {
return;
}
if (Selection.Contains(note)) {
DeselectNote(note);
} else {
SelectNote(note);
SelectNote(note, false);
}
}

public void SelectNote(UNote note) {
/// <summary>
/// Select a note and deselect all the other notes.
/// </summary>
SelectNote(note, true);
}
public void SelectNote(UNote note, bool deselectExisting) {
Expand Down

0 comments on commit d6215bd

Please sign in to comment.