Commit: 6d6ba343dd3486dc9d8f54a98a58d1f59b65708f
Author: Nathan Craddock
Date:   Thu Aug 13 11:37:10 2020 -0600
Branches: soc-2020-outliner
https://developer.blender.org/rB6d6ba343dd3486dc9d8f54a98a58d1f59b65708f

Fix: Outliner mode column preventing element expansion

Elements in modes other than Scenes or View Layer could not be expanded
when the mode column was enabled. Just an oversight on the selection
pass through.

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

M       source/blender/editors/space_outliner/outliner_select.c

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

diff --git a/source/blender/editors/space_outliner/outliner_select.c 
b/source/blender/editors/space_outliner/outliner_select.c
index 7d5e578c539..5cd819465c3 100644
--- a/source/blender/editors/space_outliner/outliner_select.c
+++ b/source/blender/editors/space_outliner/outliner_select.c
@@ -1598,6 +1598,17 @@ static bool outliner_is_co_within_restrict_columns(const 
SpaceOutliner *space_ou
   return (view_co_x > region->v2d.cur.xmax - 
outliner_restrict_columns_width(space_outliner));
 }
 
+static bool outliner_is_co_within_mode_column(SpaceOutliner *space_outliner,
+                                              const float view_mval[2])
+{
+  /* Mode toggles only show in View Layer and Scenes modes. */
+  if (!ELEM(space_outliner->outlinevis, SO_VIEW_LAYER, SO_SCENES)) {
+    return false;
+  }
+
+  return space_outliner->flag & SO_MODE_COLUMN && view_mval[0] < UI_UNIT_X;
+}
+
 /**
  * Action to run when clicking in the outliner,
  *
@@ -1620,7 +1631,7 @@ static int outliner_item_do_activate_from_cursor(bContext 
*C,
   if (outliner_is_co_within_restrict_columns(space_outliner, region, 
view_mval[0])) {
     return OPERATOR_CANCELLED;
   }
-  else if (space_outliner->flag & SO_MODE_COLUMN && view_mval[0] < UI_UNIT_X) {
+  else if (outliner_is_co_within_mode_column(space_outliner, view_mval)) {
     return OPERATOR_CANCELLED;
   }

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to