Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion OpenUtau/Controls/PianoRoll.axaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -744,7 +744,6 @@ private void NotesCanvasLeftPointerPressed(Control control, PointerPoint point,
if (noteHitInfo.hitResizeArea) {
editState = new NoteResizeEditState(
control, ViewModel, this, noteHitInfo.note,
args.KeyModifiers == KeyModifiers.Alt,
fromStart: noteHitInfo.hitResizeAreaFromStart);
Cursor = ViewConstants.cursorSizeWE;
} else if (args.KeyModifiers == cmdKey) {
Expand Down
5 changes: 2 additions & 3 deletions OpenUtau/Views/NoteEditStates.cs
Original file line number Diff line number Diff line change
Expand Up @@ -305,17 +305,16 @@ public override void End(IPointer pointer, Point point) {
class NoteResizeEditState : NoteEditState {
public readonly UNote note;
public readonly UNote? neighborNote;
public readonly bool resizeNeighbor;
public readonly int neighborNoteLength;
public readonly bool fromStart;
public bool resizeNeighbor;
protected override string? commandNameKey => "command.note.edit";

public NoteResizeEditState(
Control control,
PianoRollViewModel vm,
IValueTip valueTip,
UNote note,
bool resizeNeighbor,
bool fromStart = false) : base(control, vm, valueTip) {
this.note = note;
var notesVm = vm.NotesViewModel;
Expand All @@ -324,13 +323,13 @@ public NoteResizeEditState(
}
neighborNote = fromStart ? note.Prev : note.Next;
neighborNoteLength = neighborNote?.duration ?? 0;
this.resizeNeighbor = resizeNeighbor;
this.fromStart = fromStart;
}
public override void Update(IPointer pointer, Point point) {
var project = DocManager.Inst.Project;
var notesVm = vm.NotesViewModel;
var part = notesVm.Part;
this.resizeNeighbor = altHeld;
if (part == null) {
return;
}
Expand Down
Loading