[Bf-blender-cvs] [8e3a58578a3] master: Outliner: Correct check for element culling

Julian Eisel noreply at git.blender.org
Wed Mar 9 15:24:02 CET 2022


Commit: 8e3a58578a312c95f49b8d27ba4b35072772c4ef
Author: Julian Eisel
Date:   Wed Mar 9 15:22:35 2022 +0100
Branches: master
https://developer.blender.org/rB8e3a58578a312c95f49b8d27ba4b35072772c4ef

Outliner: Correct check for element culling

I don't see a reason to use 2x the element height for the "in-view"
checks. That seems incorrect (although shouldn't cause issues). So
remove that, I don't expect behavior changes.

===================================================================

M	source/blender/editors/space_outliner/outliner_utils.cc

===================================================================

diff --git a/source/blender/editors/space_outliner/outliner_utils.cc b/source/blender/editors/space_outliner/outliner_utils.cc
index 15a7a3bec15..556f87617f6 100644
--- a/source/blender/editors/space_outliner/outliner_utils.cc
+++ b/source/blender/editors/space_outliner/outliner_utils.cc
@@ -388,7 +388,7 @@ bool outliner_is_element_visible(const TreeElement *te)
 
 bool outliner_is_element_in_view(const TreeElement *te, const View2D *v2d)
 {
-  return ((te->ys + 2 * UI_UNIT_Y) >= v2d->cur.ymin) && (te->ys <= v2d->cur.ymax);
+  return ((te->ys + UI_UNIT_Y) >= v2d->cur.ymin) && (te->ys <= v2d->cur.ymax);
 }
 
 bool outliner_item_is_co_over_name_icons(const TreeElement *te, float view_co_x)



More information about the Bf-blender-cvs mailing list