Fix [#32884] select by group not working when active object in more than one group.
authorBastien Montagne <montagne29@wanadoo.fr>
Mon, 22 Oct 2012 06:53:51 +0000 (06:53 +0000)
committerBastien Montagne <montagne29@wanadoo.fr>
Mon, 22 Oct 2012 06:53:51 +0000 (06:53 +0000)
Would have liked to rework this whole area, but it's kind of tricky, so better to first fix that bug!

source/blender/editors/object/object_add.c
source/blender/editors/object/object_select.c

index 029b27c0400504aa0652ca957c0ea3245d342b88..b0e6bd633135f75a0ccabef3ef6ee37ffca9eca8 100644 (file)
@@ -833,8 +833,6 @@ static int group_instance_add_exec(bContext *C, wmOperator *op)
 /* only used as menu */
 void OBJECT_OT_group_instance_add(wmOperatorType *ot)
 {
-       PropertyRNA *prop;
-
        /* identifiers */
        ot->name = "Add Group Instance";
        ot->description = "Add a dupligroup instance";
@@ -849,9 +847,8 @@ void OBJECT_OT_group_instance_add(wmOperatorType *ot)
        ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
 
        /* properties */
-       prop = RNA_def_enum(ot->srna, "group", DummyRNA_NULL_items, 0, "Group", "");
-       RNA_def_enum_funcs(prop, RNA_group_itemf);
-       ot->prop = prop;
+       ot->prop = RNA_def_enum(ot->srna, "group", DummyRNA_NULL_items, 0, "Group", "");
+       RNA_def_enum_funcs(ot->prop, RNA_group_itemf);
        ED_object_add_generic_props(ot, FALSE);
 }
 
index 1388ce6115e0fe74049e9ed9d2a338bccfd6942c..687ce35f6d748b5dc44449cebad40468fdb5bb54 100644 (file)
@@ -608,7 +608,7 @@ static short select_grouped_group(bContext *C, Object *ob)  /* Select objects in
 
        for (i = 0; i < group_count; i++) {
                group = ob_groups[i];
-               uiItemStringO(layout, group->id.name + 2, 0, "OBJECT_OT_select_same_group", "group", group->id.name);
+               uiItemStringO(layout, group->id.name + 2, 0, "OBJECT_OT_select_same_group", "group", group->id.name + 2);
        }
 
        uiPupMenuEnd(C, pup);