diff options
Diffstat (limited to 'source/blender/editors/space_outliner/outliner_utils.c')
-rw-r--r-- | source/blender/editors/space_outliner/outliner_utils.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/editors/space_outliner/outliner_utils.c b/source/blender/editors/space_outliner/outliner_utils.c index 86cc6672b0f..1a0ab3e00d0 100644 --- a/source/blender/editors/space_outliner/outliner_utils.c +++ b/source/blender/editors/space_outliner/outliner_utils.c @@ -442,9 +442,11 @@ bool outliner_item_is_co_within_close_toggle(const TreeElement *te, float view_c } /* Scroll view vertically while keeping within total bounds */ -void outliner_scroll_view(ARegion *region, int delta_y) +void outliner_scroll_view(SpaceOutliner *space_outliner, ARegion *region, int delta_y) { - int y_min = MIN2(region->v2d.cur.ymin, region->v2d.tot.ymin); + int tree_width, tree_height; + outliner_tree_dimensions(space_outliner, &tree_width, &tree_height); + int y_min = MIN2(region->v2d.cur.ymin, -tree_height); region->v2d.cur.ymax += delta_y; region->v2d.cur.ymin += delta_y; |