Fix for revision 36403, using BLI_findstring. This loop looks for the last
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Mon, 2 May 2011 12:07:07 +0000 (12:07 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Mon, 2 May 2011 12:07:07 +0000 (12:07 +0000)
found entry, not the first, made this a bit more explicit in the code now.

source/blender/blenkernel/intern/context.c
source/blenderplayer/bad_level_call_stubs/stubs.c

index 55d455bc5d3b5fe26172b0dd4d04c510d00dcc59..8929b1aa4747ee403c639c19d64b4369a4382a72 100644 (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) {
index 60d6698de05d76f5a38447a5b1db1974b0d13c1e..5ce445eab03402a547b053954f4afbb2adb1f17f 100644 (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){}