Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Eisel <julian@blender.org>2020-03-06 18:56:42 +0300
committerJulian Eisel <julian@blender.org>2020-03-06 19:19:23 +0300
commitb2ee1770d4c31078518f4ec9edd5196a41345162 (patch)
tree6b7f6ff9057322245fc3b3407bece3f1c0cb3eb5 /source/blender/editors/interface/interface_ops.c
parentb825a95ec311a169d33fe21e28418f11a516c82f (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/editors/interface/interface_ops.c')
-rw-r--r--source/blender/editors/interface/interface_ops.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/source/blender/editors/interface/interface_ops.c b/source/blender/editors/interface/interface_ops.c
index 9de2824e3a3..dce584b4ae5 100644
--- a/source/blender/editors/interface/interface_ops.c
+++ b/source/blender/editors/interface/interface_ops.c
@@ -1329,7 +1329,7 @@ static int editsource_exec(bContext *C, wmOperator *op)
GHashIterator ghi;
struct uiEditSourceButStore *but_store = NULL;
- ARegion *ar = CTX_wm_region(C);
+ ARegion *region = CTX_wm_region(C);
int ret;
/* needed else the active button does not get tested */
@@ -1341,9 +1341,9 @@ static int editsource_exec(bContext *C, wmOperator *op)
ui_editsource_active_but_set(but);
/* redraw and get active button python info */
- ED_region_do_layout(C, ar);
- ED_region_do_draw(C, ar);
- ar->do_draw = false;
+ ED_region_do_layout(C, region);
+ ED_region_do_draw(C, region);
+ region->do_draw = false;
for (BLI_ghashIterator_init(&ghi, ui_editsource_info->hash);
BLI_ghashIterator_done(&ghi) == false;
@@ -1620,17 +1620,17 @@ static int ui_button_press_invoke(bContext *C, wmOperator *op, const wmEvent *ev
bScreen *sc = CTX_wm_screen(C);
const bool skip_depressed = RNA_boolean_get(op->ptr, "skip_depressed");
ARegion *ar_prev = CTX_wm_region(C);
- ARegion *ar = sc ? BKE_screen_find_region_xy(sc, RGN_TYPE_ANY, event->x, event->y) : NULL;
+ ARegion *region = sc ? BKE_screen_find_region_xy(sc, RGN_TYPE_ANY, event->x, event->y) : NULL;
- if (ar == NULL) {
- ar = ar_prev;
+ if (region == NULL) {
+ region = ar_prev;
}
- if (ar == NULL) {
+ if (region == NULL) {
return OPERATOR_PASS_THROUGH;
}
- CTX_wm_region_set(C, ar);
+ CTX_wm_region_set(C, region);
uiBut *but = UI_context_active_but_get(C);
CTX_wm_region_set(C, ar_prev);
@@ -1645,7 +1645,7 @@ static int ui_button_press_invoke(bContext *C, wmOperator *op, const wmEvent *ev
* having this avoids a minor drawing glitch. */
void *but_optype = but->optype;
- UI_but_execute(C, ar, but);
+ UI_but_execute(C, region, but);
but->optype = but_optype;
@@ -1709,14 +1709,14 @@ bool UI_drop_color_poll(struct bContext *C,
* return true always */
if (drag->type == WM_DRAG_COLOR) {
SpaceImage *sima = CTX_wm_space_image(C);
- ARegion *ar = CTX_wm_region(C);
+ ARegion *region = CTX_wm_region(C);
if (UI_but_active_drop_color(C)) {
return 1;
}
if (sima && (sima->mode == SI_MODE_PAINT) && sima->image &&
- (ar && ar->regiontype == RGN_TYPE_WINDOW)) {
+ (region && region->regiontype == RGN_TYPE_WINDOW)) {
return 1;
}
}
@@ -1734,7 +1734,7 @@ void UI_drop_color_copy(wmDrag *drag, wmDropBox *drop)
static int drop_color_invoke(bContext *C, wmOperator *op, const wmEvent *event)
{
- ARegion *ar = CTX_wm_region(C);
+ ARegion *region = CTX_wm_region(C);
uiBut *but = NULL;
float color[4];
bool gamma;
@@ -1744,7 +1744,7 @@ static int drop_color_invoke(bContext *C, wmOperator *op, const wmEvent *event)
/* find button under mouse, check if it has RNA color property and
* if it does copy the data */
- but = ui_region_find_active_but(ar);
+ but = ui_region_find_active_but(region);
if (but && but->type == UI_BTYPE_COLOR && but->rnaprop) {
const int color_len = RNA_property_array_length(&but->rnapoin, but->rnaprop);
@@ -1778,7 +1778,7 @@ static int drop_color_invoke(bContext *C, wmOperator *op, const wmEvent *event)
ED_imapaint_bucket_fill(C, color, op, event->mval);
}
- ED_region_tag_redraw(ar);
+ ED_region_tag_redraw(region);
return OPERATOR_FINISHED;
}