Fix T55034: Setting duplication group for multiple selected items only
authorPhilipp Oeser <info@graphics-engineer.com>
Mon, 14 May 2018 10:54:23 +0000 (12:54 +0200)
committerPhilipp Oeser <info@graphics-engineer.com>
Thu, 24 May 2018 07:02:17 +0000 (09:02 +0200)
affects one item

UI editing multiple selected items missed the case of PROP_POINTER
properties

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D3373

source/blender/editors/interface/interface_handlers.c

index a795a00dc2417431457ab2e82644d4c51aef4116..590b34dfc219b8704cb0264fe143971509220e3f 100644 (file)
@@ -1560,6 +1560,7 @@ static void ui_selectcontext_apply(
                        bool  b;
                        int   i;
                        float f;
+                       PointerRNA p;
                } delta, min, max;
 
                const bool is_array = RNA_property_array_check(prop);
@@ -1584,6 +1585,9 @@ static void ui_selectcontext_apply(
                                delta.b = RNA_property_boolean_get(&but->rnapoin, prop);  /* not a delta infact */
                        }
                }
+               else if (rna_type == PROP_POINTER) {
+                       delta.p = RNA_property_pointer_get(&but->rnapoin, prop);  /* not a delta infact */
+               }
 
 #ifdef USE_ALLSELECT_LAYER_HACK
                /* make up for not having 'handle_layer_buttons' */
@@ -1656,6 +1660,10 @@ static void ui_selectcontext_apply(
                                BLI_assert(!is_array);
                                RNA_property_enum_set(&lptr, lprop, other_value);
                        }
+                       else if (rna_type == PROP_POINTER) {
+                               const PointerRNA other_value = delta.p;
+                               RNA_property_pointer_set(&lptr, lprop, other_value);
+                       }
 
                        RNA_property_update(C, &lptr, prop);
                }