diff options
Diffstat (limited to 'source/blender/editors/space_file/filesel.c')
-rw-r--r-- | source/blender/editors/space_file/filesel.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/editors/space_file/filesel.c b/source/blender/editors/space_file/filesel.c index b17ca5ee319..b0818d40e53 100644 --- a/source/blender/editors/space_file/filesel.c +++ b/source/blender/editors/space_file/filesel.c @@ -300,8 +300,9 @@ FileSelection ED_fileselect_layout_offset_rect(FileLayout* layout, const rcti* r colmax = (rect->xmax)/(layout->tile_w + 2*layout->tile_border_x); rowmax = (rect->ymax)/(layout->tile_h + 2*layout->tile_border_y); - if ( is_inside(colmin, rowmin, layout->columns, layout->rows) || - is_inside(colmax, rowmax, layout->columns, layout->rows) ) { + if (is_inside(colmin, rowmin, layout->columns, layout->rows) || + is_inside(colmax, rowmax, layout->columns, layout->rows) ) + { CLAMP(colmin, 0, layout->columns-1); CLAMP(rowmin, 0, layout->rows-1); CLAMP(colmax, 0, layout->columns-1); |