diff options
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/interface/interface_ops.c | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/source/blender/editors/interface/interface_ops.c b/source/blender/editors/interface/interface_ops.c index 093f063ebea..9fa8431beea 100644 --- a/source/blender/editors/interface/interface_ops.c +++ b/source/blender/editors/interface/interface_ops.c @@ -794,7 +794,15 @@ bool UI_context_copy_to_selected_list(bContext *C, ui_context_selected_bones_via_pose(C, r_lb); } else if (RNA_struct_is_a(ptr->type, &RNA_Sequence)) { - *r_lb = CTX_data_collection_get(C, "selected_editable_sequences"); + /* Special case when we do this for 'Sequence.lock'. + * (if the sequence is locked, it wont be in "selected_editable_sequences"). */ + const char *prop_id = RNA_property_identifier(prop); + if (STREQ(prop_id, "lock")) { + *r_lb = CTX_data_collection_get(C, "selected_sequences"); + } + else { + *r_lb = CTX_data_collection_get(C, "selected_editable_sequences"); + } } else if (RNA_struct_is_a(ptr->type, &RNA_FCurve)) { *r_lb = CTX_data_collection_get(C, "selected_editable_fcurves"); @@ -901,7 +909,15 @@ bool UI_context_copy_to_selected_list(bContext *C, /* Try to recursively find an RNA_Sequence ancestor, * to handle situations like T41062... */ if ((*r_path = RNA_path_resolve_from_type_to_property(ptr, prop, &RNA_Sequence)) != NULL) { - *r_lb = CTX_data_collection_get(C, "selected_editable_sequences"); + /* Special case when we do this for 'Sequence.lock'. + * (if the sequence is locked, it wont be in "selected_editable_sequences"). */ + const char *prop_id = RNA_property_identifier(prop); + if (STREQ(prop_id, "lock")) { + *r_lb = CTX_data_collection_get(C, "selected_sequences"); + } + else { + *r_lb = CTX_data_collection_get(C, "selected_editable_sequences"); + } } } return (*r_path != NULL); |