Waveform: add "Set video position when moving start/end" (SE 4 parity)#11255
Merged
Conversation
When enabled, dragging a subtitle start/end edge in the waveform scrubs the video to that edge so the exact frame is visible. Whole-paragraph moves are excluded, matching SE 4 which only triggered on start/end resize. Defaults off. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Ports the SE 4 "Set video position when moving start/end" waveform option to the Avalonia rewrite. When enabled, dragging a subtitle's start or end edge in the waveform scrubs the video to the new edge position.
Changes:
- Adds new
SetVideoPositionOnMoveStartEndwaveform setting with persistence and a settings UI checkbox. - In
AudioVisualizer.OnPointerMoved, firesOnVideoPositionChangedwith the active paragraph's start/end on resize interactions when enabled. - Adds the corresponding language string in
LanguageSettingsandEnglish.json.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/ui/Logic/Config/SeWaveform.cs | New persisted bool setting. |
| src/ui/Logic/Config/Language/Options/LanguageSettings.cs | New language string property + default. |
| src/ui/Assets/Languages/English.json | English text for the new setting. |
| src/ui/Features/Options/Settings/SettingsViewModel.cs | Observable property with load/save. |
| src/ui/Features/Options/Settings/SettingsPage.cs | Checkbox added after "Allow overlap". |
| src/ui/Controls/AudioVisualizerControl/AudioVisualizer.cs | Fires video position change on start/end resize. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Ports the SE 4 waveform option "Set video position when moving start/end" to the Avalonia rewrite. When enabled, dragging a subtitle's start or end edge in the waveform scrubs the video to that edge, so you see the exact frame as you adjust the cue. Whole-paragraph moves are intentionally excluded, matching SE 4 which only triggered on start/end resize.
Defaults to off (matching SE 4's actual constructor default).
Changes
SeWaveform.cs— newSetVideoPositionOnMoveStartEndsetting.AudioVisualizer.cs— after the resize switch in the pointer-move handler, fires the existingOnVideoPositionChangedevent with the new start (ResizingLeft/ResizeLeftAnd) or end (ResizingRight/ResizeRightAnd) when the setting is on. ReusesMainViewModel.AudioVisualizerOnVideoPositionChanged, which already clamps and applies the position.SettingsViewModel.cs— observable property plus load/save next toWaveformAllowOverlap.SettingsPage.cs— checkbox in the Waveform settings section, right after "Allow overlap".LanguageSettings.cs+English.json— label "Set video position when moving start/end" (same wording as SE 4). Other languages fall back to English until translated.Notes
SE 4 set the position to the raw mouse
e.Seconds; this uses the paragraph's clamped/frame-snapped start/end after the drag resolves, which lands on where the cue actually ends up.🤖 Generated with Claude Code