diff options
author | Nathan Craddock <nzcraddock@gmail.com> | 2020-11-11 03:34:29 +0300 |
---|---|---|
committer | Nathan Craddock <nzcraddock@gmail.com> | 2020-11-11 03:34:29 +0300 |
commit | eeeb2c196773c13d49b9ad95260242401ab40498 (patch) | |
tree | e64b86925b6501e8eca7e99604a6da94cb3ea3fd /source/blender/editors | |
parent | c4d8f6a4a8ddc29ed27311ed7578b3c8c31399d2 (diff) | |
parent | 8953485f5612f6ddf1ce7be2320b349383caefdd (diff) |
Merge branch 'blender-v2.91-release'
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/space_outliner/outliner_select.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/source/blender/editors/space_outliner/outliner_select.c b/source/blender/editors/space_outliner/outliner_select.c index 703624f5735..999525deb3a 100644 --- a/source/blender/editors/space_outliner/outliner_select.c +++ b/source/blender/editors/space_outliner/outliner_select.c @@ -1494,6 +1494,17 @@ bool outliner_is_co_within_mode_column(SpaceOutliner *space_outliner, const floa return space_outliner->flag & SO_MODE_COLUMN && view_mval[0] < UI_UNIT_X; } +static bool outliner_is_co_within_active_mode_column(bContext *C, + SpaceOutliner *space_outliner, + const float view_mval[2]) +{ + ViewLayer *view_layer = CTX_data_view_layer(C); + Object *obact = OBACT(view_layer); + + return outliner_is_co_within_mode_column(space_outliner, view_mval) && obact && + obact->mode != OB_MODE_OBJECT; +} + /** * Action to run when clicking in the outliner, * @@ -1516,7 +1527,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; } - if (outliner_is_co_within_mode_column(space_outliner, view_mval)) { + if (outliner_is_co_within_active_mode_column(C, space_outliner, view_mval)) { return OPERATOR_CANCELLED; } @@ -1686,7 +1697,7 @@ static int outliner_box_select_invoke(bContext *C, wmOperator *op, const wmEvent return OPERATOR_CANCELLED | OPERATOR_PASS_THROUGH; } - if (outliner_is_co_within_mode_column(space_outliner, view_mval)) { + if (outliner_is_co_within_active_mode_column(C, space_outliner, view_mval)) { return OPERATOR_CANCELLED | OPERATOR_PASS_THROUGH; } |