[Bf-blender-cvs] [f60520306c4] gsoc-2018-many-light-sampling: UI: fix assert
Campbell Barton
noreply at git.blender.org
Fri Jun 1 16:17:36 CEST 2018
Commit: f60520306c43cfef31b6626fe548b854c3d68ba4
Author: Campbell Barton
Date: Fri May 25 10:45:48 2018 +0200
Branches: gsoc-2018-many-light-sampling
https://developer.blender.org/rBf60520306c43cfef31b6626fe548b854c3d68ba4
UI: fix assert
Replace hard-coded button size check with UI_UNIT_X.
Caused icon-only buttons to have strings assigned based on UI-scale.
===================================================================
M source/blender/editors/interface/interface.c
===================================================================
diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c
index 882d7de9af9..1d798c7baad 100644
--- a/source/blender/editors/interface/interface.c
+++ b/source/blender/editors/interface/interface.c
@@ -2924,7 +2924,7 @@ void ui_but_update_ex(uiBut *but, const bool validate)
switch (but->type) {
case UI_BTYPE_MENU:
- if (BLI_rctf_size_x(&but->rect) > 24.0f) {
+ if (BLI_rctf_size_x(&but->rect) >= (UI_UNIT_X * 2)) {
/* only needed for menus in popup blocks that don't recreate buttons on redraw */
if (but->block->flag & UI_BLOCK_LOOP) {
if (but->rnaprop && (RNA_property_type(but->rnaprop) == PROP_ENUM)) {
More information about the Bf-blender-cvs
mailing list