diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-03-10 18:44:16 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-03-10 18:44:16 +0400 |
commit | 98fbbe4297be2b021a22801c51b09eddb33ebe8d (patch) | |
tree | 044b99e3081d533ebbb01846874b6689f34d2933 /source/blender/editors/space_view3d | |
parent | af16cd804c86155215f76b3dea71d29a96c8e69f (diff) |
use crosshair cursor for the ruler.
Diffstat (limited to 'source/blender/editors/space_view3d')
-rw-r--r-- | source/blender/editors/space_view3d/view3d_ruler.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/editors/space_view3d/view3d_ruler.c b/source/blender/editors/space_view3d/view3d_ruler.c index 8545f82c593..43b28677ee7 100644 --- a/source/blender/editors/space_view3d/view3d_ruler.c +++ b/source/blender/editors/space_view3d/view3d_ruler.c @@ -717,6 +717,7 @@ static void view3d_ruler_header_update(ScrArea *sa) static int view3d_ruler_invoke(bContext *C, wmOperator *op, wmEvent *event) { + wmWindow *win = CTX_wm_window(C); ScrArea *sa = CTX_wm_area(C); ARegion *ar = CTX_wm_region(C); // RegionView3D *rv3d = CTX_wm_region_view3d(C); @@ -737,6 +738,7 @@ static int view3d_ruler_invoke(bContext *C, wmOperator *op, wmEvent *event) view3d_ruler_header_update(sa); + WM_cursor_modal(win, BC_CROSSCURSOR); WM_event_add_modal_handler(C, op); return OPERATOR_RUNNING_MODAL; @@ -931,8 +933,11 @@ static int view3d_ruler_modal(bContext *C, wmOperator *op, wmEvent *event) } if (ELEM(exit_code, OPERATOR_FINISHED, OPERATOR_CANCELLED)) { + wmWindow *win = CTX_wm_window(C); ScrArea *sa = CTX_wm_area(C); + WM_cursor_restore(win); + view3d_ruler_end(C, ruler_info); view3d_ruler_free(ruler_info); op->customdata = NULL; |