diff options
Diffstat (limited to 'source/blender/editors/interface/interface_ops.c')
-rw-r--r-- | source/blender/editors/interface/interface_ops.c | 30 |
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; } |