diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2017-07-17 13:17:21 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2017-07-17 13:17:21 +0300 |
commit | 377ab54daddac6c4dab02f746e5501e30889883c (patch) | |
tree | a64ef79c61a11e0164579d96f93b0411235809b8 /source/blender/editors/interface/interface.c | |
parent | 5ecbc7c0f201af1ef5903a1aa8e1abfd2b853cdd (diff) | |
parent | d4246476d0da11ba8da17806f5235530d328ad0f (diff) |
Merge branch 'master' into id_override_static
Conflicts:
source/blender/blenkernel/BKE_library.h
Diffstat (limited to 'source/blender/editors/interface/interface.c')
-rw-r--r-- | source/blender/editors/interface/interface.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c index b5e288fe9a1..f4c198b245f 100644 --- a/source/blender/editors/interface/interface.c +++ b/source/blender/editors/interface/interface.c @@ -1352,7 +1352,7 @@ static void ui_but_to_pixelrect(rcti *rect, const ARegion *ar, uiBlock *block, u rctf rectf; ui_block_to_window_rctf(ar, block, &rectf, (but) ? &but->rect : &block->rect); - BLI_rcti_rctf_copy(rect, &rectf); + BLI_rcti_rctf_copy_round(rect, &rectf); BLI_rcti_translate(rect, -ar->winrct.xmin, -ar->winrct.ymin); } @@ -2350,11 +2350,10 @@ bool ui_but_string_set_eval_num(bContext *C, uiBut *but, const char *str, double #else /* WITH_PYTHON */ - *value = atof(str); + *r_value = atof(str); ok = true; - (void)C; - (void)but; + UNUSED_VARS(C, but); #endif /* WITH_PYTHON */ @@ -3183,7 +3182,9 @@ static uiBut *ui_def_but( } if (block->flag & UI_BLOCK_RADIAL) { - but->drawflag |= (UI_BUT_TEXT_LEFT | UI_BUT_ICON_LEFT); + but->drawflag |= UI_BUT_TEXT_LEFT; + if (but->str && but->str[0]) + but->drawflag |= UI_BUT_ICON_LEFT; } else if ((block->flag & UI_BLOCK_LOOP) || ELEM(but->type, |