Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Oeser <info@graphics-engineer.com>2020-03-04 17:55:22 +0300
committerPhilipp Oeser <info@graphics-engineer.com>2020-03-04 19:35:39 +0300
commit2a4f35094074929fc29fe9d2c9ae46b96237a557 (patch)
tree20ab18303b31deb348b3a0d8ee35c328090f077a /source/blender/editors/interface/interface_ops.c
parent765f2a1bcaa70e28afd73162e4d6ec1493d13ab2 (diff)
Fix T74434: Video Sequencer: Alt+ clicking (assign to all selected) does
not work for unlocking Special case for when we do this on "lock": - locked sequences are not in "selected_editable_sequences" - use "selected_sequences" in that case Maniphest Tasks: T74434 Differential Revision: https://developer.blender.org/D7023
Diffstat (limited to 'source/blender/editors/interface/interface_ops.c')
-rw-r--r--source/blender/editors/interface/interface_ops.c20
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);