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:
authorJulian Eisel <eiseljulian@gmail.com>2015-09-19 04:05:08 +0300
committerJulian Eisel <eiseljulian@gmail.com>2015-09-19 04:12:46 +0300
commit1bb89a60280da92852c8c5205f34d3ff8b0f210c (patch)
treec59b088815766770af70fb4bf9d7dc79bda39430 /source/blender/editors/space_file/file_utils.c
parent6e19aa42bf7aa5ef7dbc9a6a37de0f4a04b6a72d (diff)
Fix file key select using wrong file after border select in scrolled view
Basically, after border selecting, a wrong file was selected by using arrow keys if the screen was scrolled a bit vertically. Reason was that we didn't use correct view space coordinates but region space coordinates for measuring distance from mouse to first/last file in selection after border select.
Diffstat (limited to 'source/blender/editors/space_file/file_utils.c')
-rw-r--r--source/blender/editors/space_file/file_utils.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/editors/space_file/file_utils.c b/source/blender/editors/space_file/file_utils.c
index 8a80e4a69ee..435c04b8ef1 100644
--- a/source/blender/editors/space_file/file_utils.c
+++ b/source/blender/editors/space_file/file_utils.c
@@ -41,6 +41,7 @@ void file_tile_boundbox(const ARegion *ar, FileLayout *layout, const int file, r
int xmin, ymax;
ED_fileselect_layout_tilepos(layout, file, &xmin, &ymax);
+ ymax = ar->v2d.tot.ymax - ymax; /* real, view space ymax */
BLI_rcti_init(r_bounds, xmin, xmin + layout->tile_w + layout->tile_border_x,
- ar->winy - ymax - layout->tile_h - layout->tile_border_y, ar->winy - ymax);
+ ymax - layout->tile_h - layout->tile_border_y, ymax);
}