diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2011-11-19 03:32:00 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2011-11-19 03:32:00 +0400 |
commit | 32b3fd32452b570d8515aeec41c30c9587a5f787 (patch) | |
tree | fdc1e214bfe7ee0655ab60c8dde4cab986e4a1ac /source/blender | |
parent | 26e08e1b9d53bc9ea5e3845336eb07e38d6bdc99 (diff) |
UI: fix issue with previous commit, could show wrong tooltip.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/editors/interface/interface_regions.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/editors/interface/interface_regions.c b/source/blender/editors/interface/interface_regions.c index 3d94fd4dc56..47dde3f03f0 100644 --- a/source/blender/editors/interface/interface_regions.c +++ b/source/blender/editors/interface/interface_regions.c @@ -379,11 +379,12 @@ ARegion *ui_tooltip_create(bContext *C, ARegion *butregion, uiBut *but) if(ELEM(but->type, ROW, MENU)) { EnumPropertyItem *item; int i, totitem, free; + int value = (but->type == ROW)? but->hardmax: ui_get_but_val(but); RNA_property_enum_items_gettexted(C, &but->rnapoin, but->rnaprop, &item, &totitem, &free); for(i=0; i<totitem; i++) { - if(item[i].identifier[0] && item[i].value == (int)but->hardmax) { + if(item[i].identifier[0] && item[i].value == value) { if(item[i].description[0]) { BLI_snprintf(data->lines[data->totline], sizeof(data->lines[0]), "%s: %s", item[i].name, item[i].description); data->color[data->totline]= 0xDDDDDD; |