diff options
author | Julian Eisel <julian@blender.org> | 2020-03-06 18:56:42 +0300 |
---|---|---|
committer | Julian Eisel <julian@blender.org> | 2020-03-06 19:19:23 +0300 |
commit | b2ee1770d4c31078518f4ec9edd5196a41345162 (patch) | |
tree | 6b7f6ff9057322245fc3b3407bece3f1c0cb3eb5 /source/blender/windowmanager/intern/wm_gesture_ops.c | |
parent | b825a95ec311a169d33fe21e28418f11a516c82f (diff) |
Cleanup: Rename ARegion variables from ar to region
The old convention was easy to confuse with ScrArea.
Part of https://developer.blender.org/T74432.
This is mostly a batch rename with some manual fixing. Only single word
variable names are changed, no prefixed/suffixed names.
Brecht van Lommel and Campbell Barton both gave me a green light for
this convention change.
Also ran clan clang format on affected files.
Diffstat (limited to 'source/blender/windowmanager/intern/wm_gesture_ops.c')
-rw-r--r-- | source/blender/windowmanager/intern/wm_gesture_ops.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/source/blender/windowmanager/intern/wm_gesture_ops.c b/source/blender/windowmanager/intern/wm_gesture_ops.c index c78f0d7376d..82bc591e2a4 100644 --- a/source/blender/windowmanager/intern/wm_gesture_ops.c +++ b/source/blender/windowmanager/intern/wm_gesture_ops.c @@ -175,14 +175,14 @@ static bool gesture_box_apply(bContext *C, wmOperator *op) int WM_gesture_box_invoke(bContext *C, wmOperator *op, const wmEvent *event) { wmWindow *win = CTX_wm_window(C); - const ARegion *ar = CTX_wm_region(C); + const ARegion *region = CTX_wm_region(C); const bool wait_for_input = !ISTWEAK(event->type) && RNA_boolean_get(op->ptr, "wait_for_input"); if (wait_for_input) { - op->customdata = WM_gesture_new(win, ar, event, WM_GESTURE_CROSS_RECT); + op->customdata = WM_gesture_new(win, region, event, WM_GESTURE_CROSS_RECT); } else { - op->customdata = WM_gesture_new(win, ar, event, WM_GESTURE_RECT); + op->customdata = WM_gesture_new(win, region, event, WM_GESTURE_RECT); } { @@ -538,10 +538,10 @@ static void gesture_tweak_modal(bContext *C, const wmEvent *event) /* This isn't very nice but needed to redraw gizmos which are hidden while tweaking, * See #WM_GIZMOGROUPTYPE_DELAY_REFRESH_FOR_TWEAK for details. */ - ARegion *ar = CTX_wm_region(C); - if ((ar != NULL) && (ar->gizmo_map != NULL)) { - if (WM_gizmomap_tag_delay_refresh_for_tweak_check(ar->gizmo_map)) { - ED_region_tag_redraw(ar); + ARegion *region = CTX_wm_region(C); + if ((region != NULL) && (region->gizmo_map != NULL)) { + if (WM_gizmomap_tag_delay_refresh_for_tweak_check(region->gizmo_map)) { + ED_region_tag_redraw(region); } } } @@ -553,12 +553,12 @@ void wm_tweakevent_test(bContext *C, const wmEvent *event, int action) wmWindow *win = CTX_wm_window(C); if (win->tweak == NULL) { - const ARegion *ar = CTX_wm_region(C); + const ARegion *region = CTX_wm_region(C); - if (ar) { + if (region) { if (event->val == KM_PRESS) { if (ELEM(event->type, LEFTMOUSE, MIDDLEMOUSE, RIGHTMOUSE)) { - win->tweak = WM_gesture_new(win, ar, event, WM_GESTURE_TWEAK); + win->tweak = WM_gesture_new(win, region, event, WM_GESTURE_TWEAK); } } } |