diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-08-22 00:34:05 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-08-22 00:34:05 +0400 |
commit | c92ab5c3ef2d8339650eb95cd2ebba8c6956b62d (patch) | |
tree | 960acc2f94886377a44a7adc03d6afc9239ec640 /source/blender/editors/space_outliner/outliner_edit.c | |
parent | abd031bb4eb2d2e8a1820da5a3338aa79266f6ef (diff) |
code cleanup: use rect size macros
Diffstat (limited to 'source/blender/editors/space_outliner/outliner_edit.c')
-rw-r--r-- | source/blender/editors/space_outliner/outliner_edit.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/space_outliner/outliner_edit.c b/source/blender/editors/space_outliner/outliner_edit.c index b669e705a25..0874ddcb279 100644 --- a/source/blender/editors/space_outliner/outliner_edit.c +++ b/source/blender/editors/space_outliner/outliner_edit.c @@ -615,7 +615,7 @@ void OUTLINER_OT_show_active(wmOperatorType *ot) static int outliner_scroll_page_exec(bContext *C, wmOperator *op) { ARegion *ar = CTX_wm_region(C); - int dy = ar->v2d.mask.ymax - ar->v2d.mask.ymin; + int dy = BLI_RCT_SIZE_Y(&ar->v2d.mask); int up = 0; if (RNA_boolean_get(op->ptr, "up")) @@ -760,10 +760,10 @@ static void outliner_find_panel(Scene *UNUSED(scene), ARegion *ar, SpaceOops *so tselem->flag |= TSE_SELECTED; /* make te->ys center of view */ - ytop = (int)(te->ys + (ar->v2d.mask.ymax - ar->v2d.mask.ymin) / 2); + ytop = (int)(te->ys + BLI_RCT_SIZE_Y(&ar->v2d.mask) / 2); if (ytop > 0) ytop = 0; ar->v2d.cur.ymax = (float)ytop; - ar->v2d.cur.ymin = (float)(ytop - (ar->v2d.mask.ymax - ar->v2d.mask.ymin)); + ar->v2d.cur.ymin = (float)(ytop - BLI_RCT_SIZE_Y(&ar->v2d.mask)); /* make te->xs ==> te->xend center of view */ xdelta = (int)(te->xs - ar->v2d.cur.xmin); |