feat: double-click a merge clip to set its join crossfade/curve override + row labels
This commit is contained in:
@@ -616,3 +616,24 @@ def test_merge_preview_blocks_short_clip(win, tmp_path, monkeypatch):
|
||||
def test_merge_preview_empty_is_noop(win):
|
||||
win._merge_list.clear()
|
||||
win._on_merge_preview()
|
||||
|
||||
|
||||
def test_merge_override_applies_and_labels(win, tmp_path):
|
||||
from PyQt6.QtCore import Qt
|
||||
a = tmp_path / "a.wav"; b = tmp_path / "b.wav"; a.write_bytes(b""); b.write_bytes(b"")
|
||||
win._merge_list.clear(); win._merge_add_paths([str(a), str(b)])
|
||||
it0 = win._merge_list.item(0)
|
||||
win._apply_merge_override(it0, 0.8, "exp")
|
||||
assert it0.data(Qt.ItemDataRole.UserRole + 2) == 0.8
|
||||
assert it0.data(Qt.ItemDataRole.UserRole + 3) == "exp"
|
||||
assert "0.80s exp" in it0.text()
|
||||
assert "⤲" not in win._merge_list.item(1).text() # last item shows no join info
|
||||
xfs, cvs = win._merge_join_values()
|
||||
assert xfs == [0.8] and cvs == ["exp"]
|
||||
|
||||
|
||||
def test_merge_double_click_last_is_noop(win, tmp_path):
|
||||
a = tmp_path / "a.wav"; a.write_bytes(b"")
|
||||
win._merge_list.clear(); win._merge_add_paths([str(a)])
|
||||
win._on_merge_item_double_clicked(win._merge_list.item(0)) # only/last -> no dialog, no raise
|
||||
assert win._merge_list.count() == 1
|
||||
|
||||
Reference in New Issue
Block a user