fix: Ctrl+click empty space starts sweep select with yellow cursor

Line 1163 called onSweepSelectStart which set up sweep
state (yellow selection rectangle). Mousemove then
selected all items in the sweep range. Changed to
onClearSelection = () => setSelectedItemIds(new Set())
which only clears selection without starting sweep.
This commit is contained in:
2026-07-28 10:10:05 +07:00
parent 5ec329933a
commit b5f3f987b7
3 changed files with 14 additions and 6 deletions
+4 -2
View File
@@ -414,6 +414,7 @@ const WaveformLane = ({
onSplitTrackAtTime,
onEditClipInSubTab,
selectedItemIds,
onClearSelection,
onSweepSelectStart,
snapValue,
bpm,
@@ -1160,11 +1161,11 @@ const WaveformLane = ({
return;
}
// Ctrl+Click on empty space: sweep select (deselect all via onSweepSelectStart)
// Ctrl+Click on empty space: deselect all, no sweep select
if (e.ctrlKey && !clickedClip && !hitItem) {
e.preventDefault();
e.stopPropagation();
if (onSweepSelectStart) onSweepSelectStart(track.id, time);
if (onClearSelection) onClearSelection();
return;
}
onPlayheadSet(time);
@@ -16622,6 +16623,7 @@ const App = () => {
onSelectTrack: setSelectedTrackId,
markers: track.markers,
onTrackLaneMouseDown: handleTrackLaneMouseDown,
onClearSelection: () => setSelectedItemIds(new Set()),
onSweepSelectStart: handleSweepSelectStart,
onDeselectItem: handleDeselectItem,
onAddToSelection: handleAddToSelection,
File diff suppressed because one or more lines are too long