Skip to content

Waveform: block overlap when drag-creating a new selection#11969

Merged
niksedk merged 1 commit into
SubtitleEdit:mainfrom
muaz978:feature/waveform-insert-selection-shortcut-overlap
Jun 29, 2026
Merged

Waveform: block overlap when drag-creating a new selection#11969
niksedk merged 1 commit into
SubtitleEdit:mainfrom
muaz978:feature/waveform-insert-selection-shortcut-overlap

Conversation

@muaz978

@muaz978 muaz978 commented Jun 29, 2026

Copy link
Copy Markdown

Part of #11602 (and an SE4-parity fix).

When dragging a new selection in the waveform (to insert a subtitle for that range), the drag extended freely into neighbouring subtitles. Resize/move already clamp against neighbours unless Shift is held or "allow overlap" is enabled, but the new-selection drag did not, so a new line could silently overlap, unlike SE4.

Clamp the dragged end to the empty gap around the selection's anchor (honouring the minimum gap); Shift or Waveform.AllowOverlap bypasses it. The rebindable "Insert new selection" shortcut already exists, so no shortcut change is needed.

When dragging a brand-new selection in the waveform (to insert a subtitle for
that range), the drag extended freely into neighbouring subtitles. Resizing and
moving existing lines already clamp against neighbours unless Shift is held or
"allow overlap" is enabled, but the new-selection drag did not - so a new line
could silently overlap its neighbours, unlike SE4.

Clamp the dragged end to the empty gap around the selection's anchor (honouring
the minimum gap), and bypass the clamp when Shift is held or Waveform.AllowOverlap
is set - matching the resize/move behaviour and SE4's "overlap blocked by default".

The rebindable "Insert new selection" shortcut already exists, so no shortcut
change is needed.
@niksedk niksedk merged commit 00bfbee into SubtitleEdit:main Jun 29, 2026
2 checks passed
@muaz978 muaz978 deleted the feature/waveform-insert-selection-shortcut-overlap branch June 29, 2026 08:55
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