Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2018-05-25 11:45:48 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-05-25 11:45:48 +0300
commite31b8303ed17f19521acb90c5dd6c58ade807821 (patch)
tree1d1dda457c8aab5ee56756ecac160f3917bda539
parentd02335a1950c81fffea815f31e47bca92ab7d33c (diff)
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.
-rw-r--r--source/blender/editors/interface/interface.c2
1 files changed, 1 insertions, 1 deletions
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)) {