Fix: Restrict recurse select when over icon during extend-range selection
Recurse selection was not restricted to "mouse over icon" during range selection (i.e. if we shift- double click on any area of tree element, resurse select is still executed, which is wrong) Also did a bit cleanup to use existing `is_over_icon` instead of calling `outliner_item_is_co_over_icon` multiple times Pull Request: https://projects.blender.org/blender/blender/pulls/118556
This commit is contained in:
committed by
Harley Acheson
parent
427eed292d
commit
5f7b5a922d
@@ -1810,14 +1810,13 @@ static int outliner_item_do_activate_from_cursor(bContext *C,
|
||||
* holding CTRL or SHIFT, ignore events when the cursor is over the icon. This disambiguates
|
||||
* the case where we are recursing *and* holding CTRL or SHIFT in order to extend or range
|
||||
* select recursively. */
|
||||
if (!recurse && (extend || use_range) &&
|
||||
outliner_item_is_co_over_icon(activate_te, view_mval[0]))
|
||||
{
|
||||
if (!recurse && (extend || use_range) && is_over_icon) {
|
||||
return OPERATOR_CANCELLED;
|
||||
}
|
||||
|
||||
if (use_range) {
|
||||
do_outliner_range_select(C, space_outliner, activate_te, extend, recurse, parent_collection);
|
||||
do_outliner_range_select(
|
||||
C, space_outliner, activate_te, extend, (recurse && is_over_icon), parent_collection);
|
||||
}
|
||||
else {
|
||||
const bool is_over_name_icons = outliner_item_is_co_over_name_icons(activate_te,
|
||||
@@ -1839,7 +1838,7 @@ static int outliner_item_do_activate_from_cursor(bContext *C,
|
||||
/* The recurse flag is set when the user double-clicks
|
||||
* to select everything in a collection or hierarchy. */
|
||||
if (recurse) {
|
||||
if (outliner_item_is_co_over_icon(activate_te, view_mval[0])) {
|
||||
if (is_over_icon) {
|
||||
/* Select or deselect object hierarchy recursively. */
|
||||
outliner_item_select(C, space_outliner, activate_te, select_flag);
|
||||
do_outliner_select_recursive(&activate_te->subtree, select, parent_collection);
|
||||
|
||||
Reference in New Issue
Block a user