diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-06-10 17:34:59 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-06-10 17:34:59 +0400 |
commit | f6e21881f5d0f86725836391d20949fe0343bd19 (patch) | |
tree | 12287d7789e683c69ce8c3157293edf7f0f283d2 /source/blender/editors/interface | |
parent | 219eca0f515f9a54953566539520fde37f2ea13b (diff) |
change RNA_struct_find_function to accept a type rather then a PointerRNA, add a check duplicate functions are not defined.
Diffstat (limited to 'source/blender/editors/interface')
-rw-r--r-- | source/blender/editors/interface/interface_handlers.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c index 8753c427816..a2adbd7a143 100644 --- a/source/blender/editors/interface/interface_handlers.c +++ b/source/blender/editors/interface/interface_handlers.c @@ -3819,22 +3819,21 @@ static int ui_numedit_but_HISTOGRAM(uiBut *but, uiHandleButtonData *data, int mx Histogram *hist = (Histogram *)but->poin; /* rcti rect; */ int changed = 1; - float /* dx, */ dy, yfac = 1.f; /* UNUSED */ + float /* dx, */ dy; /* UNUSED */ /* rect.xmin = but->x1; rect.xmax = but->x2; */ /* rect.ymin = but->y1; rect.ymax = but->y2; */ /* dx = mx - data->draglastx; */ /* UNUSED */ dy = my - data->draglasty; - - + if (in_scope_resize_zone(but, data->dragstartx, data->dragstarty)) { /* resize histogram widget itself */ hist->height = (but->y2 - but->y1) + (data->dragstarty - my); } else { /* scale histogram values */ - yfac = MIN2(powf(hist->ymax, 2.f), 1.f) * 0.5f; + const float yfac = MIN2(powf(hist->ymax, 2.f), 1.f) * 0.5f; hist->ymax += dy * yfac; CLAMP(hist->ymax, 1.f, 100.f); |