[Bf-blender-cvs] [d156139cbcc] soc-2019-outliner: Merge branch 'master' into soc-2019-outliner
Nathan Craddock
noreply at git.blender.org
Fri Aug 16 06:20:37 CEST 2019
Commit: d156139cbccc16ee457974455624cf75e91a1670
Author: Nathan Craddock
Date: Thu Aug 15 16:11:28 2019 -0600
Branches: soc-2019-outliner
https://developer.blender.org/rBd156139cbccc16ee457974455624cf75e91a1670
Merge branch 'master' into soc-2019-outliner
===================================================================
===================================================================
diff --cc source/blender/editors/space_outliner/outliner_select.c
index 19fd4511e50,7f45c4d22fa..531dd583d34
--- a/source/blender/editors/space_outliner/outliner_select.c
+++ b/source/blender/editors/space_outliner/outliner_select.c
@@@ -1358,36 -1292,28 +1358,43 @@@ 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]);
- TreeStoreElem *activate_tselem = TREESTORE(activate_te);
- outliner_item_select(soops, activate_te, extend, extend);
+ /* 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);
- /* 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, recursive);
+ /* 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);
+
+ if (use_range) {
+ do_outliner_range_select(C, soops, activate_te);
+ }
+ else {
+ outliner_item_select(soops, activate_te, extend, extend);
- do_outliner_item_activate_tree_element(
- C, scene, view_layer, soops, activate_te, activate_tselem, extend, false);
++
++ /* 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);
++ }
+ }
}
+
changed = true;
}
More information about the Bf-blender-cvs
mailing list