[Bf-blender-cvs] [0e2b56ed710] soc-2019-outliner: Merge branch 'master' into soc-2019-outliner

Nathan Craddock noreply at git.blender.org
Fri Aug 16 18:51:22 CEST 2019


Commit: 0e2b56ed7108a460b851147f5c4742b22bed1994
Author: Nathan Craddock
Date:   Fri Aug 16 09:32:29 2019 -0600
Branches: soc-2019-outliner
https://developer.blender.org/rB0e2b56ed7108a460b851147f5c4742b22bed1994

Merge branch 'master' into soc-2019-outliner

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



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

diff --cc source/blender/editors/space_outliner/outliner_select.c
index 531dd583d34,c932766ab93..19fd4511e50
--- a/source/blender/editors/space_outliner/outliner_select.c
+++ b/source/blender/editors/space_outliner/outliner_select.c
@@@ -1358,43 -1292,21 +1358,36 @@@ static int outliner_item_do_activate_fr
        changed = true;
      }
    }
 -  else if (outliner_item_is_co_within_close_toggle(te, view_mval[0])) {
 -    outliner_item_toggle_closed(te, extend);
 -    changed = true;
 -    rebuild_tree = true;
 +  /* Don't allow toggle on scene collection */
 +  else if ((TREESTORE(te)->type != TSE_VIEW_COLLECTION_BASE) &&
 +           outliner_item_is_co_within_close_toggle(te, view_mval[0])) {
 +    return OPERATOR_CANCELLED | OPERATOR_PASS_THROUGH;
    }
    else {
 -    Scene *scene = CTX_data_scene(C);
      ViewLayer *view_layer = CTX_data_view_layer(C);
 -    /* the row may also contain children, if one is hovered we want this instead of current te */
 -    TreeElement *activate_te = outliner_find_item_at_x_in_row(soops, te, view_mval[0]);
 +
 +    /* The row may also contain children, if one is hovered we want this instead of current te */
 +    bool merged_elements = false;
 +    TreeElement *activate_te = outliner_find_item_at_x_in_row(
 +        soops, te, view_mval[0], &merged_elements);
 +
 +    /* If the selected icon was an aggregate of multiple elements, run the search popup */
 +    if (merged_elements) {
 +      merged_element_search_menu_invoke(C, te, activate_te);
 +      return OPERATOR_CANCELLED;
 +    }
 +
      TreeStoreElem *activate_tselem = TREESTORE(activate_te);
  
 -    outliner_item_select(soops, activate_te, extend, extend);
 -    do_outliner_item_activate_tree_element(
 -        C, scene, view_layer, soops, activate_te, activate_tselem, extend, recursive);
 +    if (use_range) {
 +      do_outliner_range_select(C, soops, activate_te);
 +    }
 +    else {
 +      outliner_item_select(soops, activate_te, extend, extend);
- 
-       /* Only change modes when clicking on the icon/text,
-        * otherwise we can't easily select without changing modes. */
-       if ((te->flag & TE_ICONROW) == 0) {
-         if (view_mval[0] >= te->xs && view_mval[0] <= te->xend) {
-           do_outliner_item_activate_tree_element(
-               C, scene, view_layer, soops, activate_te, activate_tselem, extend, false);
-         }
-       }
++      do_outliner_item_activate_tree_element(
++          C, scene, view_layer, soops, activate_te, activate_tselem, extend, false);
 +    }
 +
      changed = true;
    }



More information about the Bf-blender-cvs mailing list