Fix rulers being removed on click
authorCampbell Barton <ideasman42@gmail.com>
Tue, 11 Dec 2018 23:04:24 +0000 (10:04 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Tue, 11 Dec 2018 23:04:24 +0000 (10:04 +1100)
source/blender/editors/space_view3d/view3d_gizmo_ruler.c

index 83db61f9e5a4c4b90711424d3688cc9be3dd6281..5623681fec4cd3758679512edbfcad2184c0c87f 100644 (file)
@@ -912,6 +912,9 @@ static int gizmo_ruler_invoke(
                copy_v3_v3(inter->drag_start_co, ruler_item_pick->co[inter->co_index]);
        }
 
+       /* Should always be true. */
+       inter->inside_region = BLI_rcti_isect_pt_v(&ar->winrct, &event->x);
+
        return OPERATOR_RUNNING_MODAL;
 }