VSE: Fix glitchy handle select for adjacent strips
For very small hotspot regions when trying to select handles on adjacent strips, selection can sometimes jump to the strip farthest away from the current mouse cursor position. This happens regardless of "Tweak Handles" setting, but is most noticeable when it is off. In the case that two strips are selected at once (which is possible because internally strip handles are shifted away from the strip body by a third of the handle size), `mouseover_strips_sorted_get` attempts to sort these strips to maintain priority, but the logic was backwards -- fix the glitch by sorting strips such that the first strip in the `Vector` is always the strip closest to the mouse cursor. Pull Request: https://projects.blender.org/blender/blender/pulls/124708
This commit is contained in:
committed by
Richard Antalik
parent
0935baee36
commit
471a148666
@@ -1021,8 +1021,8 @@ static blender::Vector<Sequence *> mouseover_strips_sorted_get(const Scene *scen
|
||||
|
||||
BLI_assert(strips.size() <= 2);
|
||||
|
||||
/* Ensure, that `seq1` is left strip and `seq2` right strip. */
|
||||
if (strips.size() == 2 && strip_to_frame_distance(scene, v2d, strips[0], mouse_co[0]) <
|
||||
/* Ensure that `strips[0]` is the strip closest to the mouse cursor. */
|
||||
if (strips.size() == 2 && strip_to_frame_distance(scene, v2d, strips[0], mouse_co[0]) >
|
||||
strip_to_frame_distance(scene, v2d, strips[1], mouse_co[0]))
|
||||
{
|
||||
std::swap(strips[0], strips[1]);
|
||||
|
||||
Reference in New Issue
Block a user