diff options
author | Nathan Craddock <nzcraddock@gmail.com> | 2020-09-10 18:49:35 +0300 |
---|---|---|
committer | Nathan Craddock <nzcraddock@gmail.com> | 2020-09-10 18:53:49 +0300 |
commit | b0741e1dcbc5e4549e95745b1f1b501f8cd33add (patch) | |
tree | 4f4bbdb0cd0132c0e2150a453d4c26fc5a4e4d06 /source/blender/editors/space_outliner/outliner_edit.c | |
parent | e628e8821e7c81b912968c28e1972afe7078343a (diff) |
Outliner: Use right click target element for context menu
When opening the outliner context menu with multiple data types
selected, the menu did not show operators related to the target of the
cursor. For example, if a modifier and object are selected, a right
click on the modifier does not show the modifier options, rather it
shows the object context menu.
Now the data type of the right-click element is used to determine the
context menu to draw. For this to work properly the active element is
now set on right click.
Part of T77408
Manifest Task: https://developer.blender.org/T77770
Differential Revision: https://developer.blender.org/D8647
Diffstat (limited to 'source/blender/editors/space_outliner/outliner_edit.c')
-rw-r--r-- | source/blender/editors/space_outliner/outliner_edit.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/editors/space_outliner/outliner_edit.c b/source/blender/editors/space_outliner/outliner_edit.c index 7cd27ae3321..dea67a8678d 100644 --- a/source/blender/editors/space_outliner/outliner_edit.c +++ b/source/blender/editors/space_outliner/outliner_edit.c @@ -437,7 +437,8 @@ static void id_delete(bContext *C, ReportList *reports, TreeElement *te, TreeSto Main *bmain = CTX_data_main(C); ID *id = tselem->id; - BLI_assert(te->idcode != 0 && id != NULL); + BLI_assert(id != NULL); + BLI_assert((tselem->type == 0 && te->idcode != 0) || tselem->type == TSE_LAYER_COLLECTION); UNUSED_VARS_NDEBUG(te); if (te->idcode == ID_LI && ((Library *)id)->parent != NULL) { |