Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2018-08-24 04:54:12 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-08-24 04:54:12 +0300
commit5bd731b6730b6dc31dad7c3e8ccf0555b7bed3f1 (patch)
treee8fe4602249dcf1ee77bf17eefa678cb09b23db7 /source/blender/makesrna/intern
parent0cf12dfc14f8312d9fe9db1d512dfb55104f6ac6 (diff)
parent7ec1a56a41953eac23e252fad9a3bf1605471abc (diff)
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender/makesrna/intern')
-rw-r--r--source/blender/makesrna/intern/rna_ui_api.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/source/blender/makesrna/intern/rna_ui_api.c b/source/blender/makesrna/intern/rna_ui_api.c
index f4c4d8a7a44..5001f633727 100644
--- a/source/blender/makesrna/intern/rna_ui_api.c
+++ b/source/blender/makesrna/intern/rna_ui_api.c
@@ -156,8 +156,7 @@ static void rna_uiItemEnumR_string(
/* Get translated name (label). */
name = rna_translate_ui_text(name, text_ctxt, NULL, prop, translate);
- /* XXX This will search property again :( */
- uiItemEnumR_string(layout, ptr, propname, value, name, icon);
+ uiItemEnumR_string_prop(layout, ptr, prop, value, name, icon);
}
static void rna_uiItemPointerR(
@@ -166,17 +165,20 @@ static void rna_uiItemPointerR(
const char *name, const char *text_ctxt, bool translate, int icon)
{
PropertyRNA *prop = RNA_struct_find_property(ptr, propname);
-
if (!prop) {
RNA_warning("property not found: %s.%s", RNA_struct_identifier(ptr->type), propname);
return;
}
+ PropertyRNA *searchprop = RNA_struct_find_property(searchptr, searchpropname);
+ if (!searchprop) {
+ RNA_warning("property not found: %s.%s", RNA_struct_identifier(searchptr->type), searchpropname);
+ return;
+ }
/* Get translated name (label). */
name = rna_translate_ui_text(name, text_ctxt, NULL, prop, translate);
- /* XXX This will search property again :( */
- uiItemPointerR(layout, ptr, propname, searchptr, searchpropname, name, icon);
+ uiItemPointerR_prop(layout, ptr, prop, searchptr, searchprop, name, icon);
}
static PointerRNA rna_uiItemO(