From 3c5462e660c9cf45d599a874ee226fd5122b2e23 Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Thu, 29 Mar 2007 12:57:15 +0000 Subject: Bugfix #6426 Clearing number buttons and press enter (for assigning zero) did not give a button event anymore. Caused by code for python eval, it treated this as an error. --- source/blender/src/interface.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'source/blender/src/interface.c') diff --git a/source/blender/src/interface.c b/source/blender/src/interface.c index 5f01bad0772..962b9f526a7 100644 --- a/source/blender/src/interface.c +++ b/source/blender/src/interface.c @@ -2081,7 +2081,9 @@ static int ui_act_as_text_but(uiBut *but) /* Uncomment this if you want to see an error message (and annoy users) */ /* error("Invalid Python expression, check console");*/ value = 0.0f; /* Zero out value on error */ - retval = 0; /* invalidate return value if eval failed */ + + if(str[0]) + retval = 0; /* invalidate return value if eval failed, except when string was null */ } if(but->pointype!=FLO) value= (int)value; -- cgit v1.2.3