diff options
author | Julian Eisel <julian@blender.org> | 2020-04-03 14:25:03 +0300 |
---|---|---|
committer | Julian Eisel <julian@blender.org> | 2020-04-03 14:34:50 +0300 |
commit | 905c0269f302e8e0e7a27dda8d5256fdcd06ce60 (patch) | |
tree | 1c720d4f0069879d5b4c0c9ea8db867106920d4f /source/blender/editors/interface/view2d_ops.c | |
parent | 1a69384e76e2b1ab11c87a582eb2cdf26386ac59 (diff) |
Cleanup: Rename ScrArea variables from sa to area
Follow up of b2ee1770d4c3 and 10c2254d412d, part of T74432.
Now the area and region naming conventions should be less confusing.
Mostly a careful batch rename but had to do few smaller fixes.
Also ran clang-format on affected files.
Diffstat (limited to 'source/blender/editors/interface/view2d_ops.c')
-rw-r--r-- | source/blender/editors/interface/view2d_ops.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/source/blender/editors/interface/view2d_ops.c b/source/blender/editors/interface/view2d_ops.c index 2adf441514b..18e14798767 100644 --- a/source/blender/editors/interface/view2d_ops.c +++ b/source/blender/editors/interface/view2d_ops.c @@ -81,7 +81,7 @@ typedef struct v2dViewPanData { /** screen where view pan was initiated */ bScreen *sc; /** area where view pan was initiated */ - ScrArea *sa; + ScrArea *area; /** region where view pan was initiated */ ARegion *region; /** view2d we're operating in */ @@ -127,7 +127,7 @@ static int view_pan_init(bContext *C, wmOperator *op) /* set pointers to owners */ vpd->sc = CTX_wm_screen(C); - vpd->sa = CTX_wm_area(C); + vpd->area = CTX_wm_area(C); vpd->v2d = v2d; vpd->region = region; @@ -190,7 +190,7 @@ static void view_pan_apply_ex(bContext *C, v2dViewPanData *vpd, float dx, float /* request updates to be done... */ WM_event_add_mousemove(CTX_wm_window(C)); - UI_view2d_sync(vpd->sc, vpd->sa, v2d, V2D_LOCK_COPY); + UI_view2d_sync(vpd->sc, vpd->area, v2d, V2D_LOCK_COPY); } static void view_pan_apply(bContext *C, wmOperator *op) @@ -589,13 +589,13 @@ typedef struct v2dViewZoomData { */ static void view_zoom_axis_lock_defaults(bContext *C, bool r_do_zoom_xy[2]) { - ScrArea *sa = CTX_wm_area(C); + ScrArea *area = CTX_wm_area(C); r_do_zoom_xy[0] = true; r_do_zoom_xy[1] = true; /* default not to zoom the sequencer vertically */ - if (sa && sa->spacetype == SPACE_SEQ) { + if (area && area->spacetype == SPACE_SEQ) { ARegion *region = CTX_wm_region(C); if (region && region->regiontype == RGN_TYPE_WINDOW) { @@ -758,8 +758,8 @@ static void view_zoomstep_apply_ex( UI_view2d_curRect_validate(v2d); if (ED_region_snap_size_apply(region, snap_test)) { - ScrArea *sa = CTX_wm_area(C); - ED_area_tag_redraw(sa); + ScrArea *area = CTX_wm_area(C); + ED_area_tag_redraw(area); WM_event_add_notifier(C, NC_SCREEN | NA_EDITED, NULL); } @@ -1017,8 +1017,8 @@ static void view_zoomdrag_apply(bContext *C, wmOperator *op) UI_view2d_curRect_validate(v2d); if (ED_region_snap_size_apply(vzd->region, snap_test)) { - ScrArea *sa = CTX_wm_area(C); - ED_area_tag_redraw(sa); + ScrArea *area = CTX_wm_area(C); + ED_area_tag_redraw(area); WM_event_add_notifier(C, NC_SCREEN | NA_EDITED, NULL); } @@ -2211,8 +2211,8 @@ static int reset_exec(bContext *C, wmOperator *UNUSED(op)) UI_view2d_curRect_validate(v2d); if (ED_region_snap_size_apply(region, snap_test)) { - ScrArea *sa = CTX_wm_area(C); - ED_area_tag_redraw(sa); + ScrArea *area = CTX_wm_area(C); + ED_area_tag_redraw(area); WM_event_add_notifier(C, NC_SCREEN | NA_EDITED, NULL); } |