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/space_text/text_autocomplete.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/space_text/text_autocomplete.c')
-rw-r--r--source/blender/editors/space_text/text_autocomplete.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/editors/space_text/text_autocomplete.c b/source/blender/editors/space_text/text_autocomplete.c
index a560b8af70f..97ce7035222 100644
--- a/source/blender/editors/space_text/text_autocomplete.c
+++ b/source/blender/editors/space_text/text_autocomplete.c
@@ -49,7 +49,7 @@
/** \name Public API
* \{ */
-int text_do_suggest_select(SpaceText *st, ARegion *ar)
+int text_do_suggest_select(SpaceText *st, ARegion *region)
{
SuggItem *item, *first, *last /* , *sel */ /* UNUSED */;
TextLine *tmp;
@@ -84,7 +84,7 @@ int text_do_suggest_select(SpaceText *st, ARegion *ar)
text_update_character_width(st);
x = TXT_BODY_LEFT(st) + (st->runtime.cwidth_px * (st->text->curc - st->left));
- y = ar->winy - st->runtime.lheight_px * l - 2;
+ y = region->winy - st->runtime.lheight_px * l - 2;
w = SUGG_LIST_WIDTH * st->runtime.cwidth_px + U.widget_unit;
h = SUGG_LIST_SIZE * st->runtime.lheight_px + 0.4f * U.widget_unit;
@@ -336,7 +336,7 @@ static int text_autocomplete_modal(bContext *C, wmOperator *op, const wmEvent *e
{
SpaceText *st = CTX_wm_space_text(C);
ScrArea *sa = CTX_wm_area(C);
- ARegion *ar = BKE_area_find_region_type(sa, RGN_TYPE_WINDOW);
+ ARegion *region = BKE_area_find_region_type(sa, RGN_TYPE_WINDOW);
int draw = 0, tools = 0, swallow = 0, scroll = 1;
Text *text = CTX_data_edit_text(C);
@@ -356,7 +356,7 @@ static int text_autocomplete_modal(bContext *C, wmOperator *op, const wmEvent *e
switch (event->type) {
case LEFTMOUSE:
if (event->val == KM_PRESS) {
- if (text_do_suggest_select(st, ar)) {
+ if (text_do_suggest_select(st, region)) {
swallow = 1;
}
else {
@@ -374,7 +374,7 @@ static int text_autocomplete_modal(bContext *C, wmOperator *op, const wmEvent *e
break;
case MIDDLEMOUSE:
if (event->val == KM_PRESS) {
- if (text_do_suggest_select(st, ar)) {
+ if (text_do_suggest_select(st, region)) {
ED_text_undo_push_init(C);
confirm_suggestion(st->text);
text_update_line_edited(st->text->curl);