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:
authorCampbell Barton <ideasman42@gmail.com>2012-08-21 03:06:17 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-08-21 03:06:17 +0400
commit77f47799ddff99da672aa58e5d989237403e7707 (patch)
tree951fa8eb0d6853355b697cc262ed92ddd9dd7a83 /source/blender/editors/space_nla
parent94ce9505a9bf07e3d2532c82a0b8396f7c9727b3 (diff)
code cleanup: use BLI_RCT_SIZE macro
Diffstat (limited to 'source/blender/editors/space_nla')
-rw-r--r--source/blender/editors/space_nla/nla_edit.c4
-rw-r--r--source/blender/editors/space_nla/nla_select.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/space_nla/nla_edit.c b/source/blender/editors/space_nla/nla_edit.c
index a3e9ca1c4a2..775dd5445c3 100644
--- a/source/blender/editors/space_nla/nla_edit.c
+++ b/source/blender/editors/space_nla/nla_edit.c
@@ -304,13 +304,13 @@ static int nlaedit_viewall(bContext *C, const short onlySel)
/* set the horizontal range, with an extra offset so that the extreme keys will be in view */
get_nlastrip_extents(&ac, &v2d->cur.xmin, &v2d->cur.xmax, onlySel);
- extra = 0.1f * (v2d->cur.xmax - v2d->cur.xmin);
+ extra = 0.1f * BLI_RCT_SIZE_X(&v2d->cur);
v2d->cur.xmin -= extra;
v2d->cur.xmax += extra;
/* set vertical range */
v2d->cur.ymax = 0.0f;
- v2d->cur.ymin = (float)-(v2d->mask.ymax - v2d->mask.ymin);
+ v2d->cur.ymin = (float)-BLI_RCT_SIZE_Y(&v2d->mask);
/* do View2D syncing */
UI_view2d_sync(CTX_wm_screen(C), CTX_wm_area(C), v2d, V2D_LOCK_COPY);
diff --git a/source/blender/editors/space_nla/nla_select.c b/source/blender/editors/space_nla/nla_select.c
index b6bef651af3..e7610210881 100644
--- a/source/blender/editors/space_nla/nla_select.c
+++ b/source/blender/editors/space_nla/nla_select.c
@@ -309,7 +309,7 @@ static int nlaedit_borderselect_exec(bContext *C, wmOperator *op)
* - the frame-range select option is favored over the channel one (x over y), as frame-range one is often
* used for tweaking timing when "blocking", while channels is not that useful...
*/
- if ((rect.xmax - rect.xmin) >= (rect.ymax - rect.ymin))
+ if (BLI_RCT_SIZE_X(&rect) >= BLI_RCT_SIZE_Y(&rect))
mode = NLA_BORDERSEL_FRAMERANGE;
else
mode = NLA_BORDERSEL_CHANNELS;