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-22 00:34:05 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-08-22 00:34:05 +0400
commitc92ab5c3ef2d8339650eb95cd2ebba8c6956b62d (patch)
tree960acc2f94886377a44a7adc03d6afc9239ec640 /source/blender/editors/space_node/node_view.c
parentabd031bb4eb2d2e8a1820da5a3338aa79266f6ef (diff)
code cleanup: use rect size macros
Diffstat (limited to 'source/blender/editors/space_node/node_view.c')
-rw-r--r--source/blender/editors/space_node/node_view.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/source/blender/editors/space_node/node_view.c b/source/blender/editors/space_node/node_view.c
index 6f549bd252f..e89e798a6fa 100644
--- a/source/blender/editors/space_node/node_view.c
+++ b/source/blender/editors/space_node/node_view.c
@@ -91,8 +91,8 @@ static int space_node_view_flag(bContext *C, SpaceNode *snode, ARegion *ar, cons
}
if (tot) {
- width = cur_new.xmax - cur_new.xmin;
- height = cur_new.ymax - cur_new.ymin;
+ width = BLI_RCT_SIZE_X(&cur_new);
+ height = BLI_RCT_SIZE_Y(&cur_new);
/* for single non-frame nodes, don't zoom in, just pan view,
* but do allow zooming out, this allows for big nodes to be zoomed out */
@@ -104,9 +104,6 @@ static int space_node_view_flag(bContext *C, SpaceNode *snode, ARegion *ar, cons
BLI_rctf_resize(&cur_new, oldwidth, oldheight);
}
else {
- width = cur_new.xmax - cur_new.xmin;
- height = cur_new.ymax - cur_new.ymin;
-
if (width > height) {
float newheight;
newheight = oldheight * width / oldwidth;