diff options
author | Sergey Sharybin <sergey@blender.org> | 2022-05-13 11:42:28 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey@blender.org> | 2022-05-13 11:42:28 +0300 |
commit | 8741cf20380c7037cbde5f0935610e985ad7c62a (patch) | |
tree | 9797bf3639676f5530e356a5ca55599b076db835 /source/blender | |
parent | 42d748be3425821400677db99a6e2c079d9e271c (diff) |
Cleanup: Proper state check in marker slide operator
The previous code was had confusing logic, but since it was acting
more as a fall-back it did not cause bugs for users.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/editors/space_clip/tracking_ops.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/space_clip/tracking_ops.c b/source/blender/editors/space_clip/tracking_ops.c index 239e9925997..2a891757536 100644 --- a/source/blender/editors/space_clip/tracking_ops.c +++ b/source/blender/editors/space_clip/tracking_ops.c @@ -928,13 +928,13 @@ static int slide_marker_modal(bContext *C, wmOperator *op, const wmEvent *event) BKE_tracking_marker_clamp_search_size(data->marker); } - else if (data->area == TRACK_AREA_SEARCH) { + else if (data->action == SLIDE_ACTION_OFFSET) { const float d[2] = {dx, dy}; add_v2_v2v2(data->min, data->old_search_min, d); add_v2_v2v2(data->max, data->old_search_max, d); - } - BKE_tracking_marker_clamp_search_position(data->marker); + BKE_tracking_marker_clamp_search_position(data->marker); + } } data->marker->flag &= ~MARKER_TRACKED; |