From 56e9d2d37cdda796e4f2f55d9e4d8fddd196770c Mon Sep 17 00:00:00 2001 From: lunarcleint <88809950+lunarcleint@users.noreply.github.com> Date: Wed, 26 Jul 2023 19:32:30 -0700 Subject: [PATCH] fixing copying and pasting notes/events --- source/funkin/editors/charter/Charter.hx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/source/funkin/editors/charter/Charter.hx b/source/funkin/editors/charter/Charter.hx index 1c3fd716..83985f9a 100644 --- a/source/funkin/editors/charter/Charter.hx +++ b/source/funkin/editors/charter/Charter.hx @@ -676,9 +676,11 @@ class Charter extends UIState { selection.loop(function (note:CharterNote) { notesGroup.remove(note, true); note.kill(); + this.selection.remove(note); }, function (event:CharterEvent) { eventsGroup.remove(event, true); event.kill(); + this.selection.remove(event); }); if (addToUndo) @@ -995,7 +997,7 @@ class Charter extends UIState { } } selection = sObjects; - addToUndo(CCreateSelection(sObjects)); + addToUndo(CCreateSelection(sObjects.copy())); } function _edit_cut(_) { @@ -1003,7 +1005,6 @@ class Charter extends UIState { _edit_copy(_); deleteSelection(selection, false); - selection = []; } function _edit_delete(_) { @@ -1018,15 +1019,14 @@ class Charter extends UIState { case null: // do nothing case CCreateSelection(selection): - trace(selection); selection.loop(function (n:CharterNote) { notesGroup.remove(n, true); n.kill(); - selection.remove(n); + this.selection.remove(n); }, function (e:CharterEvent) { eventsGroup.remove(e, true); e.kill(); - selection.remove(e); + this.selection.remove(e); }); case CDeleteSelection(selection): selection.loop(function (n:CharterNote) {