Skip to content

Commit

Permalink
Also updating effect IDs when entire clips are pasted
Browse files Browse the repository at this point in the history
  • Loading branch information
jonoomph committed Feb 15, 2024
1 parent cc313ba commit 6f2c96e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/windows/views/webview.py
Original file line number Diff line number Diff line change
Expand Up @@ -1670,6 +1670,10 @@ def Paste_Triggered(self, action, position, layer_id, clip_ids, tran_ids):
clip.type = 'insert'
clip.data.pop('id')

# Update effect IDs
clip.data['effects'] = [{k: (get_app().project.generate_id() if k == 'id' else v)
for k, v in effect.items()} for effect in clip.data['effects']]

# Adjust the position and track
clip.data['position'] += position_diff
clip.data['layer'] += layer_diff
Expand Down

0 comments on commit 6f2c96e

Please sign in to comment.