feat: wire interactive waveform selection to cursor/length (two-way, clamped view)

This commit is contained in:
2026-07-02 17:18:26 +02:00
parent 25fbf8142f
commit 356cfcc7d7
2 changed files with 76 additions and 10 deletions
+11
View File
@@ -440,6 +440,17 @@ def test_waveform_zoom_emits_view(win):
assert seen and seen[-1][1] < 4.0
def test_waveform_selection_syncs_cursor_and_length(win):
win._file_path = "/x/video.mp4"
win._cursor = 10.0
win._spn_audio_len.setValue(3.0)
win._wave.set_view(10.0, 6.0)
win._wave.set_selection(11.0, 14.0)
win._on_wave_selection_changed(11.0, 14.0)
assert win._cursor == 11.0
assert abs(win._spn_audio_len.value() - 3.0) < 1e-6
def test_audition_button_present_and_safe(win):
from PyQt6.QtWidgets import QPushButton
assert isinstance(win._btn_audio_play, QPushButton)