Commit 595f0128 authored by Davis King's avatar Davis King

Made it so the image_display lets you add parts outside the object's bounding

box.
parent dfefd981
...@@ -6038,8 +6038,7 @@ namespace dlib ...@@ -6038,8 +6038,7 @@ namespace dlib
if (!rect_is_selected) if (!rect_is_selected)
return; return;
const rectangle valid_area = get_rect_on_screen(selected_rect); const point loc = last_right_click_pos;
const point loc = nearest_point(valid_area,last_right_click_pos);
// Transform loc from gui window space into the space used by the overlay // Transform loc from gui window space into the space used by the overlay
// rectangles (i.e. relative to the raw image) // rectangles (i.e. relative to the raw image)
...@@ -6569,7 +6568,7 @@ namespace dlib ...@@ -6569,7 +6568,7 @@ namespace dlib
if (btn == base_window::RIGHT && rect_is_selected) if (btn == base_window::RIGHT && rect_is_selected)
{ {
last_right_click_pos = point(x,y); last_right_click_pos = point(x,y);
parts_menu.set_rect(get_rect_on_screen(selected_rect)); parts_menu.set_rect(rect);
return; return;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment