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_graph/graph_edit.c | |
parent | abd031bb4eb2d2e8a1820da5a3338aa79266f6ef (diff) |
code cleanup: use rect size macros
Diffstat (limited to 'source/blender/editors/space_graph/graph_edit.c')
-rw-r--r-- | source/blender/editors/space_graph/graph_edit.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/editors/space_graph/graph_edit.c b/source/blender/editors/space_graph/graph_edit.c index de6aa42d5a6..f01d64b46b8 100644 --- a/source/blender/editors/space_graph/graph_edit.c +++ b/source/blender/editors/space_graph/graph_edit.c @@ -224,16 +224,16 @@ static int graphkeys_viewall(bContext *C, const short do_sel_only, const short i return OPERATOR_CANCELLED; /* set the horizontal range, with an extra offset so that the extreme keys will be in view */ - get_graph_keyframe_extents(&ac, - &cur_new.xmin, &cur_new.xmax, - &cur_new.ymin, &cur_new.ymax, - do_sel_only, include_handles); + get_graph_keyframe_extents(&ac, + &cur_new.xmin, &cur_new.xmax, + &cur_new.ymin, &cur_new.ymax, + do_sel_only, include_handles); - extra = 0.1f * (cur_new.xmax - cur_new.xmin); + extra = 0.1f * BLI_RCT_SIZE_X(&cur_new); cur_new.xmin -= extra; cur_new.xmax += extra; - extra = 0.1f * (cur_new.ymax - cur_new.ymin); + extra = 0.1f * BLI_RCT_SIZE_Y(&cur_new); cur_new.ymin -= extra; cur_new.ymax += extra; |