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>2017-03-05 12:51:23 +0300
committerCampbell Barton <ideasman42@gmail.com>2017-03-05 12:51:23 +0300
commit4a4d71414e7f4604d5e0146cc362068dddb71be5 (patch)
treea27ad058f753617dc965ba58f2bacb93f58644d1 /source/blender/editors/space_view3d/view3d_view.c
parent2089a17f7e69bb2106950b041486e23928065fb0 (diff)
BLI_rect: add init from point functions
Initialize a rectangle from point+size.
Diffstat (limited to 'source/blender/editors/space_view3d/view3d_view.c')
-rw-r--r--source/blender/editors/space_view3d/view3d_view.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/source/blender/editors/space_view3d/view3d_view.c b/source/blender/editors/space_view3d/view3d_view.c
index 8582952d1a0..683fbc4185a 100644
--- a/source/blender/editors/space_view3d/view3d_view.c
+++ b/source/blender/editors/space_view3d/view3d_view.c
@@ -1184,10 +1184,8 @@ short view3d_opengl_select(ViewContext *vc, unsigned int *buffer, unsigned int b
/* case not a border select */
if (input->xmin == input->xmax) {
- rect.xmin = input->xmin - 12; /* seems to be default value for bones only now */
- rect.xmax = input->xmin + 12;
- rect.ymin = input->ymin - 12;
- rect.ymax = input->ymin + 12;
+ /* seems to be default value for bones only now */
+ BLI_rctf_init_pt_size(&rect, (const float[2]){input->xmin, input->ymin}, 12);
}
else {
BLI_rctf_rcti_copy(&rect, input);