From 798380aec94691f45c9fa74f75dab9fb8b6a0ec4 Mon Sep 17 00:00:00 2001 From: Hilmi Yafi A <56539775+hilmiyafia@users.noreply.github.com> Date: Fri, 12 Jun 2026 06:48:26 +0700 Subject: [PATCH 1/3] Update NoteEditStates.cs --- OpenUtau/Views/NoteEditStates.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/OpenUtau/Views/NoteEditStates.cs b/OpenUtau/Views/NoteEditStates.cs index 0752dcdb6..4a057af91 100644 --- a/OpenUtau/Views/NoteEditStates.cs +++ b/OpenUtau/Views/NoteEditStates.cs @@ -378,6 +378,13 @@ public override void Update(IPointer pointer, Point point) { } if (fromStart) { DocManager.Inst.ExecuteCmd(new MoveNoteCommand(part, note, -deltaDuration, 0)); + // shiftHeld is not true for the first update method call even though it is pressed. + // This behavior is not correct, and if the notes aren't aligned to the grid, it will + // cause a gap to form. Detecting the shift key by passing it as a parameter + // solve this issue. + } else if (shiftHeld) { + var rippleNotes = part.notes.Where(n => n.position > note.position).ToList(); + DocManager.Inst.ExecuteCmd(new MoveNoteCommand(part, rippleNotes, deltaDuration, 0)); } DocManager.Inst.ExecuteCmd(new ResizeNoteCommand(part, note, deltaDuration)); valueTip.UpdateValueTip(note.duration.ToString()); From 286738828f4549f1cd0fa419a7456c52c819cdda Mon Sep 17 00:00:00 2001 From: Hilmi Yafi A <56539775+hilmiyafia@users.noreply.github.com> Date: Wed, 17 Jun 2026 14:06:32 +0700 Subject: [PATCH 2/3] Fix keyModifiers not being written at editState initialization --- OpenUtau/Controls/PianoRoll.axaml.cs | 4 ++++ OpenUtau/Views/NoteEditStates.cs | 4 ---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/OpenUtau/Controls/PianoRoll.axaml.cs b/OpenUtau/Controls/PianoRoll.axaml.cs index abdb081b3..9c77b5941 100644 --- a/OpenUtau/Controls/PianoRoll.axaml.cs +++ b/OpenUtau/Controls/PianoRoll.axaml.cs @@ -615,6 +615,10 @@ public void NotesCanvasPointerPressed(object sender, PointerPressedEventArgs arg Cursor = ViewConstants.cursorHand; } if (editState != null) { + editState.altShiftHeld = args.KeyModifiers == (KeyModifiers.Alt | KeyModifiers.Shift); + editState.shiftHeld = args.KeyModifiers == KeyModifiers.Shift; + editState.ctrlHeld = args.KeyModifiers == cmdKey; + editState.altHeld = args.KeyModifiers == KeyModifiers.Alt; editState.Begin(point.Pointer, point.Position); editState.Update(point.Pointer, point.Position); } diff --git a/OpenUtau/Views/NoteEditStates.cs b/OpenUtau/Views/NoteEditStates.cs index 4a057af91..bc95dce41 100644 --- a/OpenUtau/Views/NoteEditStates.cs +++ b/OpenUtau/Views/NoteEditStates.cs @@ -378,10 +378,6 @@ public override void Update(IPointer pointer, Point point) { } if (fromStart) { DocManager.Inst.ExecuteCmd(new MoveNoteCommand(part, note, -deltaDuration, 0)); - // shiftHeld is not true for the first update method call even though it is pressed. - // This behavior is not correct, and if the notes aren't aligned to the grid, it will - // cause a gap to form. Detecting the shift key by passing it as a parameter - // solve this issue. } else if (shiftHeld) { var rippleNotes = part.notes.Where(n => n.position > note.position).ToList(); DocManager.Inst.ExecuteCmd(new MoveNoteCommand(part, rippleNotes, deltaDuration, 0)); From 90037706e9489328ddfa124252ca627c37a95c9a Mon Sep 17 00:00:00 2001 From: Hilmi Yafi A <56539775+hilmiyafia@users.noreply.github.com> Date: Wed, 17 Jun 2026 15:36:55 +0700 Subject: [PATCH 3/3] Fix neighbor note being cut while doing ripple note --- OpenUtau/Views/NoteEditStates.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenUtau/Views/NoteEditStates.cs b/OpenUtau/Views/NoteEditStates.cs index 92607e58a..73a103c39 100644 --- a/OpenUtau/Views/NoteEditStates.cs +++ b/OpenUtau/Views/NoteEditStates.cs @@ -379,7 +379,7 @@ public override void Update(IPointer pointer, Point point) { return; } // Resize neighbor note - if (resizeNeighbor && neighborNote != null) { + if (resizeNeighbor && neighborNote != null && !shiftHeld) { int cutDuration = deltaDuration; if (!this.resizeNeighbor && deltaDuration < 0) { cutDuration = Math.Max(deltaDuration, neighborNote.duration - neighborNoteLength);