Fix bounds checking in the rectangular clip visual tool with detached video

Originally committed to SVN as r5960.
This commit is contained in:
Thomas Goyne 2011-12-05 03:22:33 +00:00
parent 009d99407b
commit 73ee949d55

View file

@ -105,9 +105,8 @@ bool VisualToolClip::InitializeHold() {
void VisualToolClip::UpdateHold() {
// Limit to video area
Vector2D zero(0, 0);
cur_1 = zero.Max(video_res.Min(drag_start));
cur_2 = zero.Max(video_res.Min(mouse_pos));
cur_1 = video_pos.Max((video_pos + video_res).Min(drag_start));
cur_2 = video_pos.Max((video_pos + video_res).Min(mouse_pos));
SetFeaturePositions();
CommitHold();