[Bf-blender-cvs] [442ce8610d1] blender-v3.3-release: Fix Outliner: Click next to View Layer name triggers object select

Philipp Oeser noreply at git.blender.org
Thu Jan 12 22:26:58 CET 2023


Commit: 442ce8610d1d6e076565655cdb16df7c2167e3a7
Author: Philipp Oeser
Date:   Thu Dec 1 11:41:26 2022 +0100
Branches: blender-v3.3-release
https://developer.blender.org/rB442ce8610d1d6e076565655cdb16df7c2167e3a7

Fix Outliner: Click next to View Layer name triggers object select

Unlike other (closed) hierarchies, view layers dont show their contents
next to their names.

Code would still find the item via outliner_find_item_at_x_in_row though,
this is now prevented (same as if the viewlayer was open [instead of
collapsed]).

Fixes T102357.

Maniphest Tasks: T102357

Differential Revision: https://developer.blender.org/D16662

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

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 8cbaead3876..fcfdd9c21e2 100644
--- a/source/blender/editors/space_outliner/outliner_utils.cc
+++ b/source/blender/editors/space_outliner/outliner_utils.cc
@@ -132,9 +132,11 @@ TreeElement *outliner_find_item_at_x_in_row(const SpaceOutliner *space_outliner,
                                             bool *r_is_merged_icon,
                                             bool *r_is_over_icon)
 {
-  /* if parent_te is opened, it doesn't show children in row */
+  TreeStoreElem *parent_tselem = TREESTORE(parent_te);
   TreeElement *te = parent_te;
-  if (!TSELEM_OPEN(TREESTORE(parent_te), space_outliner)) {
+
+  /* If parent_te is opened, or it is a ViewLayer, it doesn't show children in row. */
+  if (!TSELEM_OPEN(parent_tselem, space_outliner) && parent_tselem->type != TSE_R_LAYER) {
     te = outliner_find_item_at_x_in_row_recursive(parent_te, view_co_x, r_is_merged_icon);
   }



More information about the Bf-blender-cvs mailing list