Skip to content

Commit c1442b5

Browse files
authored
Fix transition direction detection bug, when clips are overlapping (#5096)
1 parent b59a47d commit c1442b5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/windows/views/webview.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -382,12 +382,13 @@ def update_transition_data(self, transition_json, only_basic_props=True,
382382
fps_float = float(fps["num"]) / float(fps["den"])
383383
duration = existing_item.data["end"] - existing_item.data["start"]
384384
position = transition_data["position"]
385+
layer = transition_data["layer"]
385386

386387
# Determine if transition is intersecting a clip
387388
# For example, the left side of a clip, or the right side, so we can determine
388389
# which direction the wipe should be moving in
389390
is_forward_direction = True
390-
for intersecting_clip in Clip.filter(intersect=position):
391+
for intersecting_clip in Clip.filter(intersect=position, layer=layer):
391392
log.debug(f"Intersecting Clip: {intersecting_clip}")
392393
diff_from_start = abs(intersecting_clip.data.get("position", 0.0) - position)
393394
diff_from_end = abs((intersecting_clip.data.get("position", 0.0) + \

0 commit comments

Comments
 (0)