Fix for revision 36403, using BLI_findstring. This loop looks for the last

found entry, not the first, made this a bit more explicit in the code now.
This commit is contained in:
Brecht Van Lommel
2011-05-02 12:07:07 +00:00
parent c2f18383f9
commit e23e125c34
2 changed files with 7 additions and 4 deletions

View File

@@ -451,10 +451,12 @@ static int ctx_data_get(bContext *C, const char *member, bContextDataResult *res
C->data.recursion= 1;
entry= BLI_findstring(&C->wm.store->entries, member, offsetof(bContextStoreEntry, name));
if(entry) {
result->ptr= entry->ptr;
done= 1;
for(entry=C->wm.store->entries.last; entry; entry=entry->prev) {
if(strcmp(entry->name, member) == 0) {
result->ptr= entry->ptr;
done= 1;
break;
}
}
}
if(done!=1 && recursion < 2 && C->wm.region) {

View File

@@ -349,6 +349,7 @@ ListBase uiTemplateList(struct uiLayout *layout, struct bContext *C, struct Poin
void uiTemplateRunningJobs(struct uiLayout *layout, struct bContext *C){}
void uiTemplateOperatorSearch(struct uiLayout *layout){}
void uiTemplateHeader3D(struct uiLayout *layout, struct bContext *C){}
void uiTemplateEditModeSelection(struct uiLayout *layout, struct bContext *C){}
void uiTemplateTextureImage(struct uiLayout *layout, struct bContext *C, struct Tex *tex){}
void uiTemplateImage(struct uiLayout *layout, struct bContext *C, struct PointerRNA *ptr, char *propname, struct PointerRNA *userptr, int compact){}
void uiTemplateDopeSheetFilter(struct uiLayout *layout, struct bContext *C, struct PointerRNA *ptr){}