Fix select_similar_type_itemf() enum-item-generator func to return the whole prop_similar_types when context is NULL (needed at least by i18n tools!).
This commit is contained in:
parent
dde529e977
commit
eb57856a19
|
@ -834,7 +834,12 @@ static int edbm_select_similar_exec(bContext *C, wmOperator *op)
|
|||
static EnumPropertyItem *select_similar_type_itemf(bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop),
|
||||
int *free)
|
||||
{
|
||||
Object *obedit = CTX_data_edit_object(C);
|
||||
Object *obedit;
|
||||
|
||||
if (!C) /* needed for docs and i18n tools */
|
||||
return prop_similar_types;
|
||||
|
||||
obedit = CTX_data_edit_object(C);
|
||||
|
||||
if (obedit && obedit->type == OB_MESH) {
|
||||
EnumPropertyItem *item = NULL;
|
||||
|
@ -862,7 +867,7 @@ static EnumPropertyItem *select_similar_type_itemf(bContext *C, PointerRNA *UNUS
|
|||
|
||||
return item;
|
||||
}
|
||||
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue