Bugfix [#32410] Create New Group (CTRL+G) tried to activate even when nothing is
authorJoshua Leung <aligorith@gmail.com>
Sun, 26 Aug 2012 08:03:31 +0000 (08:03 +0000)
committerJoshua Leung <aligorith@gmail.com>
Sun, 26 Aug 2012 08:03:31 +0000 (08:03 +0000)
selected

Some group operators were missing poll() callbacks

source/blender/editors/object/object_group.c

index 53bfdde..cca37cf 100644 (file)
@@ -370,6 +370,7 @@ void OBJECT_OT_group_add(wmOperatorType *ot)
        
        /* api callbacks */
        ot->exec = group_add_exec;
+       ot->poll = ED_operator_objectmode;
 
        /* flags */
        ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
@@ -403,6 +404,7 @@ void OBJECT_OT_group_link(wmOperatorType *ot)
        /* api callbacks */
        ot->exec = group_link_exec;
        ot->invoke = WM_enum_search_invoke;
+       ot->poll = ED_operator_objectmode;
 
        /* flags */
        ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
@@ -438,6 +440,7 @@ void OBJECT_OT_group_remove(wmOperatorType *ot)
        
        /* api callbacks */
        ot->exec = group_remove_exec;
+       ot->poll = ED_operator_objectmode;
 
        /* flags */
        ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;