mirror of
https://github.com/OpenCut-app/OpenCut.git
synced 2026-07-13 21:52:53 +02:00
fix: allow timeline paste and duplicate commands to reassign updated tracks
This commit is contained in:
@@ -38,7 +38,7 @@ export class PasteCommand extends Command {
|
|||||||
...this.clipboardItems.map((item) => item.element.startTime),
|
...this.clipboardItems.map((item) => item.element.startTime),
|
||||||
);
|
);
|
||||||
|
|
||||||
const updatedTracks = [...this.savedState];
|
let updatedTracks = [...this.savedState];
|
||||||
const itemsByTrackId = groupClipboardItemsByTrackId({
|
const itemsByTrackId = groupClipboardItemsByTrackId({
|
||||||
clipboardItems: this.clipboardItems,
|
clipboardItems: this.clipboardItems,
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ export class DuplicateElementsCommand extends Command {
|
|||||||
this.previousSelection = editor.selection.getSelectedElements();
|
this.previousSelection = editor.selection.getSelectedElements();
|
||||||
this.duplicatedElements = [];
|
this.duplicatedElements = [];
|
||||||
|
|
||||||
const updatedTracks = [...this.savedState];
|
let updatedTracks = [...this.savedState];
|
||||||
|
|
||||||
for (const track of this.savedState) {
|
for (const track of this.savedState) {
|
||||||
const elementsToDuplicate = this.elements.filter(
|
const elementsToDuplicate = this.elements.filter(
|
||||||
|
|||||||
Reference in New Issue
Block a user