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:
@@ -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
@@ -539,6 +539,12 @@
|
||||
- **Ghi chú/Test (nếu có):** `npm run build` pass. Ctrl+Click+Drag section/MIDI item → copy đến vị trí mới, item không bị selected.
|
||||
---
|
||||
|
||||
### [2026-07-28 10:10] Task: Ctrl+Click vùng trống không sweep select, chỉ deselect
|
||||
- **Tóm tắt thay đổi:** Thay `onSweepSelectStart` bằng `onClearSelection` trong Ctrl+Click vùng không có items. Trước đây gọi `handleSweepSelectStart` → yellow cursor + mousemove chọn items. Fix: `onClearSelection = () => setSelectedItemIds(new Set())` — chỉ clear selection, không sweep.
|
||||
- **Các file ảnh hưởng:** `app/static/js/app.jsx`, `app/static/js/app.precompiled.js`
|
||||
- **Ghi chú/Test (nếu có):** `npm run build` pass. Ctrl+click vùng trống → deselect hết, không yellow cursor.
|
||||
---
|
||||
|
||||
### [2026-07-28 10:06] Task: Ctrl+S trong SECTION-TAB chỉ lưu section, không export SF
|
||||
- **Tóm tắt thay đổi:** Di chuyển SECTION-TAB save check từ handler thứ 2 (dead code, shadowed bởi export handler) lên handler đầu tiên. Line 8066: nếu `activeTab.startsWith('session_')` → `handleSaveSectionTab`, else → `handleExportSFS`.
|
||||
- **Các file ảnh hưởng:** `app/static/js/app.jsx`, `app/static/js/app.precompiled.js`
|
||||
|
||||
Reference in New Issue
Block a user