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-04-03 14:25:03 +0300
committerJulian Eisel <julian@blender.org>2020-04-03 14:34:50 +0300
commit905c0269f302e8e0e7a27dda8d5256fdcd06ce60 (patch)
tree1c720d4f0069879d5b4c0c9ea8db867106920d4f /source/blender/editors/interface/view2d.c
parent1a69384e76e2b1ab11c87a582eb2cdf26386ac59 (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.c')
-rw-r--r--source/blender/editors/interface/view2d.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/source/blender/editors/interface/view2d.c b/source/blender/editors/interface/view2d.c
index adf0d6e372c..6fcce3a18e1 100644
--- a/source/blender/editors/interface/view2d.c
+++ b/source/blender/editors/interface/view2d.c
@@ -865,7 +865,6 @@ void UI_view2d_curRect_validate(View2D *v2d)
* to make sure 'related' views stay in synchrony */
void UI_view2d_sync(bScreen *screen, ScrArea *area, View2D *v2dcur, int flag)
{
- ScrArea *sa;
ARegion *region;
/* don't continue if no view syncing to be done */
@@ -900,8 +899,8 @@ void UI_view2d_sync(bScreen *screen, ScrArea *area, View2D *v2dcur, int flag)
/* check if doing whole screen syncing (i.e. time/horizontal) */
if ((v2dcur->flag & V2D_VIEWSYNC_SCREEN_TIME) && (screen)) {
- for (sa = screen->areabase.first; sa; sa = sa->next) {
- for (region = sa->regionbase.first; region; region = region->next) {
+ for (ScrArea *area_iter = screen->areabase.first; area_iter; area_iter = area_iter->next) {
+ for (region = area_iter->regionbase.first; region; region = region->next) {
/* don't operate on self */
if (v2dcur != &region->v2d) {
/* only if view has horizontal locks enabled */
@@ -1915,17 +1914,17 @@ View2D *UI_view2d_fromcontext(const bContext *C)
/* same as above, but it returns regionwindow. Utility for pulldowns or buttons */
View2D *UI_view2d_fromcontext_rwin(const bContext *C)
{
- ScrArea *sa = CTX_wm_area(C);
+ ScrArea *area = CTX_wm_area(C);
ARegion *region = CTX_wm_region(C);
- if (sa == NULL) {
+ if (area == NULL) {
return NULL;
}
if (region == NULL) {
return NULL;
}
if (region->regiontype != RGN_TYPE_WINDOW) {
- ARegion *region_win = BKE_area_find_region_type(sa, RGN_TYPE_WINDOW);
+ ARegion *region_win = BKE_area_find_region_type(area, RGN_TYPE_WINDOW);
return region_win ? &(region_win->v2d) : NULL;
}
return &(region->v2d);