Fix: Last row in file browser showing sometimes clipped out of view
In the vertical list display mode, if only the top part of a file was scrolled into view, the file wouldn't actually draw. So while scrolling down the list, the last item would visibly pop up. This wasn't intended, not drawing these items is just an optimization. Issue was the offset for the table header (reading something like "Name | Modified | Size") wasn't accounted for.
This commit is contained in:
@@ -1291,7 +1291,7 @@ void file_draw_list(const bContext *C, ARegion *region)
|
||||
}
|
||||
|
||||
offset = ED_fileselect_layout_offset(
|
||||
layout, int(region->v2d.cur.xmin), int(-region->v2d.cur.ymax));
|
||||
layout, int(region->v2d.cur.xmin), int(-region->v2d.cur.ymax) + layout->offset_top);
|
||||
offset = std::max(offset, 0);
|
||||
|
||||
numfiles_layout = ED_fileselect_layout_numfiles(layout, region);
|
||||
|
||||
Reference in New Issue
Block a user