[Bf-blender-cvs] [e31b8303ed1] master: UI: fix assert
Campbell Barton
noreply at git.blender.org
Fri May 25 10:47:09 CEST 2018
Commit: e31b8303ed17f19521acb90c5dd6c58ade807821
Author: Campbell Barton
Date: Fri May 25 10:45:48 2018 +0200
Branches: master
https://developer.blender.org/rBe31b8303ed17f19521acb90c5dd6c58ade807821
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