Fixes#166: dragging a selection up from the last track deselected it and
selected every track above instead. Fixed, along with related Edit-window drag
problems:
- Drag selection spans exactly the tracks between the press and the pointer,
in either direction, and the whole window updates in the same frame.
- Shift+click in another track adds it to the selection with the same range,
as in Pro Tools, so the selected tracks no longer have to be adjacent. A
click outside the range extends it.
- Track names follow Pro Tools' rules in the Edit window, the Mix window and
the Tracks list: Shift+click selects every track between the nearest
selected one and the clicked one, and Cmd+click (Ctrl+click on Windows and
Linux) adds or removes one. A click on a name used to replace the selection;
only the Edit header's background added, and it treated Shift like Cmd.
- Dropping a track's name plate lower down no longer sends the track to the end.
- Drags act where you pressed: a quick drag from a clip edge now trims instead
of moving the clip.
- Dragging past the edge of the track area scrolls, and a flick past the last
track selects down to it.
- The insertion point moves on press, shows immediately, and only on the
selected tracks.
- edit.select no longer makes a new document revision when nothing changed
(each one is resent to the audio engine).
- Fixes a panic when a fade drag's clip shrinks to zero length.
In Pro Tools, E (with Commands Keyboard Focus on) zooms the Edit window
to the edit selection and fits the selected tracks to the window, and
pressing it again brings back the view from before. SoundCraft had no
Zoom Toggle.
view.zoom_toggle, in its own command module, stores the zoom, the
scroll and the selected tracks' heights in the session's new
edit.zoom_toggle, so the view to go back to is saved with the session.
It then zooms so the selection fills the timeline and gives the
selected tracks equal shares of the track area: Pro Tools' Fit To
Window height. Hidden tracks are left alone. Run again, it puts all of
that back. With only an insertion point the zoom stays and its tracks
are fitted. The UI passes the track area's size; agents can pass
width_px and height_px.
TrackHeight::Fit, which nothing could reach and which drew 88 points
tall, now carries its height in points, so every place that sizes a
track row reads it unchanged.
The Edit window scrolls the first fitted track to the top when Zoom
Toggle turns on, and back to where it was when it turns off, whichever
way it was toggled (key, button, control channel, undo).
As in Pro Tools, E works in the Edit window while Commands Keyboard
Focus (the a-z button) is on, on every OS. A Zoom Toggle button left of
the Zoomer lights while it is on and toggles it too.
This follows Pro Tools' Zoom Toggle settings for audio editing:
Selection for both zooms, Fit To Window, no track view change. Its
other preferences, Ctrl+E (Pro Tools' key with the focus off),
Alt+Shift+E (cancel) and following the edit selection are left out.
Tests cover the zoom, the fitted heights, going back, insertion points,
hostile sizes and stored views, and E and the toolbar button on macOS,
Windows and Linux.
Keep the never-overwrite writer, and also give sources that share a path
their own files (#123). Save Copy In checks replace, then uses
save_session_copy (#124).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Request lines were read with BufRead::lines, which buffers a whole line
before anything looks at its length, and every accepted connection got its
own thread with no limit.
- Read each line with a bounded read: a line longer than MAX_LINE
(256 MiB) is refused with an error reply and the connection
closed, without buffering the rest of it.
- Serve at most MAX_CONNECTIONS (16) connections at once; further ones get
an error line and are closed. A slot is released when its connection
ends, including when its thread can't start or panics.
Request handling is otherwise unchanged. Adds tests for the line limit,
CRLF and final-line handling, an end-to-end request over loopback, and the
connection cap.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Fixes#166: dragging a selection up from the last track deselected it and
selected every track above instead. Fixed, along with related Edit-window drag
problems:
- Drag selection spans exactly the tracks between the press and the pointer,
in either direction, and the whole window updates in the same frame.
- Shift+click in another track adds it to the selection with the same range,
as in Pro Tools, so the selected tracks no longer have to be adjacent. A
click outside the range extends it.
- Dropping a track's name plate lower down no longer sends the track to the end.
- Drags act where you pressed: a quick drag from a clip edge now trims instead
of moving the clip.
- Dragging past the edge of the track area scrolls, and a flick past the last
track selects down to it.
- The insertion point moves on press, shows immediately, and only on the
selected tracks.
- edit.select no longer makes a new document revision when nothing changed
(each one is resent to the audio engine).
- Fixes a panic when a fade drag's clip shrinks to zero length.