diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2019-03-12 17:05:11 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2019-03-12 17:48:24 +0300 |
commit | d5576d3b0fcbc3791abb9ab53ef7677775780ed7 (patch) | |
tree | a881486e44d3dbf05b1f0e5670297ab9fce8fc33 /source/blender/editors/space_outliner/outliner_collections.c | |
parent | 33dd01fc69d820fedd86d118d5bb01036955380e (diff) |
Cleanup: Outliner's Collection duplicate: don't check for visualization type in exec function.
This has already been ensured by poll callback...
Diffstat (limited to 'source/blender/editors/space_outliner/outliner_collections.c')
-rw-r--r-- | source/blender/editors/space_outliner/outliner_collections.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/source/blender/editors/space_outliner/outliner_collections.c b/source/blender/editors/space_outliner/outliner_collections.c index efb28124e57..f7084399268 100644 --- a/source/blender/editors/space_outliner/outliner_collections.c +++ b/source/blender/editors/space_outliner/outliner_collections.c @@ -446,7 +446,6 @@ static TreeElement *outliner_active_collection(bContext *C) static int collection_duplicate_exec(bContext *C, wmOperator *op) { Main *bmain = CTX_data_main(C); - SpaceOutliner *soops = CTX_wm_space_outliner(C); TreeElement *te = outliner_active_collection(C); const bool linked = strstr(op->idname, "linked") != NULL; @@ -486,13 +485,7 @@ static int collection_duplicate_exec(bContext *C, wmOperator *op) "it won't be linked to any view layer"); } - switch (soops->outlinevis) { - case SO_SCENES: - case SO_VIEW_LAYER: - case SO_LIBRARIES: - BKE_collection_duplicate(bmain, parent, collection, true, true, !linked); - break; - } + BKE_collection_duplicate(bmain, parent, collection, true, true, !linked); DEG_relations_tag_update(bmain); WM_main_add_notifier(NC_SCENE | ND_LAYER, CTX_data_scene(C)); |