[Bf-blender-cvs] [37001920431] master: Fix T59910: material editor UI issue after recent changes.

Brecht Van Lommel noreply at git.blender.org
Fri Dec 28 11:36:44 CET 2018


Commit: 37001920431633490b743ee4ebd814f4d043b78e
Author: Brecht Van Lommel
Date:   Fri Dec 28 11:28:58 2018 +0100
Branches: master
https://developer.blender.org/rB37001920431633490b743ee4ebd814f4d043b78e

Fix T59910: material editor UI issue after recent changes.

This reverts part of commit 4f98266cf6, ref D4123.

===================================================================

M	source/blender/editors/interface/interface_layout.c

===================================================================

diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c
index eb1b86559bf..87927ef7643 100644
--- a/source/blender/editors/interface/interface_layout.c
+++ b/source/blender/editors/interface/interface_layout.c
@@ -285,8 +285,8 @@ static int ui_text_icon_width(uiLayout *layout, const char *name, int icon, bool
 	bool variable;
 	const int unit_x = UI_UNIT_X * (layout->scale[0] ? layout->scale[0] : 1.0f);
 
-	if (!name[0])
-		return unit_x;  /* icon only or empty name */
+	if (icon && !name[0])
+		return unit_x;  /* icon only */
 
 	variable = ui_layout_variable_size(layout);



More information about the Bf-blender-cvs mailing list