diff options
author | Julian Eisel <julian@blender.org> | 2020-04-20 02:00:02 +0300 |
---|---|---|
committer | Julian Eisel <julian@blender.org> | 2020-04-20 02:00:02 +0300 |
commit | d290bdd42abb6a8878eeee0933a06d1950ed23d1 (patch) | |
tree | 4662dcccc7fef7b57c80c51afbd7e30f94145ae2 /source/blender/editors/space_outliner | |
parent | 2816b22b381df710b83c0dbc5d079ad0e27db50c (diff) |
Fix missing Outliner selection syncing on "Select Hierarchy"
Adds syncing to a few operations that change selection, to avoid some
annoyances (like drag and drop of hierarchy to a different collection
only linking the parent to the collection).
Note that there's further refinement work for selection syncing in
D5572, but is awaiting some code design decisions. Meanwhile such quite
annoying issues should be fixed.
Addresses T75610.
Diffstat (limited to 'source/blender/editors/space_outliner')
-rw-r--r-- | source/blender/editors/space_outliner/outliner_tools.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/editors/space_outliner/outliner_tools.c b/source/blender/editors/space_outliner/outliner_tools.c index d7b673c1b9e..a6c1594678b 100644 --- a/source/blender/editors/space_outliner/outliner_tools.c +++ b/source/blender/editors/space_outliner/outliner_tools.c @@ -1383,12 +1383,14 @@ static int outliner_object_operation_exec(bContext *C, wmOperator *op) str = "Select Object Hierarchy"; DEG_id_tag_update(&scene->id, ID_RECALC_SELECT); WM_event_add_notifier(C, NC_SCENE | ND_OB_SELECT, scene); + ED_outliner_select_sync_from_object_tag(C); } else if (event == OL_OP_DESELECT) { outliner_do_object_operation(C, op->reports, scene, soops, &soops->tree, object_deselect_cb); str = "Deselect Objects"; DEG_id_tag_update(&scene->id, ID_RECALC_SELECT); WM_event_add_notifier(C, NC_SCENE | ND_OB_SELECT, scene); + ED_outliner_select_sync_from_object_tag(C); } else if (event == OL_OP_DELETE) { ViewLayer *view_layer = CTX_data_view_layer(C); @@ -1727,6 +1729,7 @@ static int outliner_id_operation_exec(bContext *C, wmOperator *op) } case OUTLINER_IDOP_PASTE: { WM_operator_name_call(C, "OUTLINER_OT_id_paste", WM_OP_INVOKE_DEFAULT, NULL); + ED_outliner_select_sync_from_all_tag(C); ED_undo_push(C, "Paste"); break; } @@ -1760,6 +1763,7 @@ static int outliner_id_operation_exec(bContext *C, wmOperator *op) case OUTLINER_IDOP_SELECT_LINKED: outliner_do_libdata_operation( C, op->reports, scene, soops, &soops->tree, id_select_linked_cb, NULL); + ED_outliner_select_sync_from_all_tag(C); ED_undo_push(C, "Select"); break; |