From 31736280f3840205584b8380eba7dc91db9774b1 Mon Sep 17 00:00:00 2001 From: liuycsd Date: Fri, 16 Feb 2024 00:53:12 +0000 Subject: [PATCH 1/2] Fix keyboard bindings of PianoRollWindow to match the comments --- OpenUtau/Views/PianoRollWindow.axaml.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OpenUtau/Views/PianoRollWindow.axaml.cs b/OpenUtau/Views/PianoRollWindow.axaml.cs index 645238951..5dec3e092 100644 --- a/OpenUtau/Views/PianoRollWindow.axaml.cs +++ b/OpenUtau/Views/PianoRollWindow.axaml.cs @@ -1321,7 +1321,7 @@ bool OnKeyExtendedHandler(KeyEventArgs args) { } // to view end if (isShift) { - playVm.MovePlayPos(notesVm.Part.position + (int)(notesVm.TickOffset)); + playVm.MovePlayPos(notesVm.Part.position + (int)(notesVm.TickOffset + notesVm.Bounds.Width / notesVm.TickWidth)); return true; } break; @@ -1349,7 +1349,7 @@ bool OnKeyExtendedHandler(KeyEventArgs args) { } // select none if (isCtrl) { - notesVm.SelectAllNotes(); + notesVm.DeselectNotes(); return true; } break; From 1458949c08c56db3eea4e991b3364fa16b98777a Mon Sep 17 00:00:00 2001 From: liuycsd Date: Fri, 16 Feb 2024 00:57:26 +0000 Subject: [PATCH 2/2] Make MainWindow and PianoRollWindow focusable to fix focusing OnMenuClosed --- OpenUtau/Views/MainWindow.axaml | 1 + OpenUtau/Views/PianoRollWindow.axaml | 1 + 2 files changed, 2 insertions(+) diff --git a/OpenUtau/Views/MainWindow.axaml b/OpenUtau/Views/MainWindow.axaml index 2181498e0..5b94bfd29 100644 --- a/OpenUtau/Views/MainWindow.axaml +++ b/OpenUtau/Views/MainWindow.axaml @@ -9,6 +9,7 @@ Icon="/Assets/open-utau.ico" Title="{Binding Title}" MinWidth="300" MinHeight="200" KeyDown="OnKeyDown" PointerPressed="OnPointerPressed" Closing="WindowClosing" + Focusable="True" TransparencyLevelHint="None" ExtendClientAreaToDecorationsHint="{Binding ExtendToFrame}"> diff --git a/OpenUtau/Views/PianoRollWindow.axaml b/OpenUtau/Views/PianoRollWindow.axaml index 1aa18efec..7f9484a8d 100644 --- a/OpenUtau/Views/PianoRollWindow.axaml +++ b/OpenUtau/Views/PianoRollWindow.axaml @@ -9,6 +9,7 @@ x:Class="OpenUtau.App.Views.PianoRollWindow" Icon="/Assets/open-utau.ico" Title="{Binding NotesViewModel.WindowTitle}" MinWidth="300" MinHeight="200" KeyDown="OnKeyDown" Closing="WindowClosing" + Focusable="True" TransparencyLevelHint="None" ExtendClientAreaToDecorationsHint="{Binding ExtendToFrame}" Deactivated="WindowDeactivated">