More fix (cleanup) to r56063: remove call to RNA_create_pointer, it has already been called by uiButGetOperatorPtrRNA() if needed.

(I thought it would also copy idproperties, but as it does not...).
This commit is contained in:
Bastien Montagne 2013-04-19 13:03:30 +00:00
parent eaf1e7a888
commit e430ee20d5

@ -3885,8 +3885,8 @@ static void operator_enum_call_cb(struct bContext *UNUSED(C), void *but, void *a
} }
} }
/* Same parameters as for uiDefSearchBut, with an additional operator pointer, from where to get property to search, /* Same parameters as for uiDefSearchBut, with additional operator type and properties, used by callback
* operator type, and operator porperties. */ * to call again the right op with the right options (properties values). */
uiBut *uiDefSearchButO_ptr(uiBlock *block, wmOperatorType *ot, IDProperty *properties, uiBut *uiDefSearchButO_ptr(uiBlock *block, wmOperatorType *ot, IDProperty *properties,
void *arg, int retval, int icon, int maxlen, int x, int y, void *arg, int retval, int icon, int maxlen, int x, int y,
short width, short height, float a1, float a2, const char *tip) short width, short height, float a1, float a2, const char *tip)
@ -3901,8 +3901,7 @@ uiBut *uiDefSearchButO_ptr(uiBlock *block, wmOperatorType *ot, IDProperty *prope
if (properties) { if (properties) {
PointerRNA *ptr = uiButGetOperatorPtrRNA(but); PointerRNA *ptr = uiButGetOperatorPtrRNA(but);
/* Copy pointer. */ /* Copy idproperties. */
RNA_pointer_create(NULL, ot->srna, NULL, ptr);
ptr->data = IDP_CopyProperty(properties); ptr->data = IDP_CopyProperty(properties);
} }