summaryrefslogtreecommitdiff
path: root/apps/web/src/components/editor/timeline.tsx
diff options
context:
space:
mode:
authoraashishparuvada <aashishvardhanp@gmail.com>2025-06-23 22:49:56 +0530
committeraashishparuvada <aashishvardhanp@gmail.com>2025-06-23 22:49:56 +0530
commitd605cd762cc3c784d908d36a12605d7d3547f1f1 (patch)
tree0e41dc497587e9cf620bc5cee670abdbeb7dd136 /apps/web/src/components/editor/timeline.tsx
parentfddbecc736a037b938385eb5eb7d1ec752581c76 (diff)
downloadopencut-d605cd762cc3c784d908d36a12605d7d3547f1f1.tar.gz
hotfix:fixed-cmd-for-deselection
Diffstat (limited to 'apps/web/src/components/editor/timeline.tsx')
-rw-r--r--apps/web/src/components/editor/timeline.tsx9
1 files changed, 9 insertions, 0 deletions
diff --git a/apps/web/src/components/editor/timeline.tsx b/apps/web/src/components/editor/timeline.tsx
index 675b398c..b95f9839 100644
--- a/apps/web/src/components/editor/timeline.tsx
+++ b/apps/web/src/components/editor/timeline.tsx
@@ -1409,9 +1409,18 @@ function TimelineTrackContent({
style={{ width: `${clipWidth}px`, left: `${clipLeft}px` }}
onClick={(e) => {
e.stopPropagation();
+ const isSelected = selectedClips.some(
+ (c) => c.trackId === track.id && c.clipId === clip.id
+ );
+
if (e.metaKey || e.ctrlKey || e.shiftKey) {
+ // Multi-selection mode: toggle the clip
selectClip(track.id, clip.id, true);
+ } else if (isSelected) {
+ // If clip is already selected, deselect it
+ deselectClip(track.id, clip.id);
} else {
+ // If clip is not selected, select it (replacing other selections)
selectClip(track.id, clip.id, false);
}
}}