Skip to content

Waveform: add "Set video position when moving start/end" (SE 4 parity)#11255

Merged
niksedk merged 1 commit into
mainfrom
feat/waveform-set-videopos-on-move-startend
May 29, 2026
Merged

Waveform: add "Set video position when moving start/end" (SE 4 parity)#11255
niksedk merged 1 commit into
mainfrom
feat/waveform-set-videopos-on-move-startend

Conversation

@niksedk
Copy link
Copy Markdown
Member

@niksedk niksedk commented May 29, 2026

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 — new SetVideoPositionOnMoveStartEnd setting.
  • AudioVisualizer.cs — after the resize switch in the pointer-move handler, fires the existing OnVideoPositionChanged event with the new start (ResizingLeft/ResizeLeftAnd) or end (ResizingRight/ResizeRightAnd) when the setting is on. Reuses MainViewModel.AudioVisualizerOnVideoPositionChanged, which already clamps and applies the position.
  • SettingsViewModel.cs — observable property plus load/save next to WaveformAllowOverlap.
  • 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

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>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 SetVideoPositionOnMoveStartEnd waveform setting with persistence and a settings UI checkbox.
  • In AudioVisualizer.OnPointerMoved, fires OnVideoPositionChanged with the active paragraph's start/end on resize interactions when enabled.
  • Adds the corresponding language string in LanguageSettings and English.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.

@niksedk niksedk merged commit 60ee507 into main May 29, 2026
3 of 4 checks passed
@niksedk niksedk deleted the feat/waveform-set-videopos-on-move-startend branch May 29, 2026 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants