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:
authorTon Roosendaal <ton@blender.org>2007-03-29 16:57:15 +0400
committerTon Roosendaal <ton@blender.org>2007-03-29 16:57:15 +0400
commit3c5462e660c9cf45d599a874ee226fd5122b2e23 (patch)
tree8714c54f2d63adaa99f9318f102d2d6601ff02db /source/blender/src/interface.c
parent054c471a043698864a5f8aa03445e0b64a221d65 (diff)
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.
Diffstat (limited to 'source/blender/src/interface.c')
-rw-r--r--source/blender/src/interface.c4
1 files changed, 3 insertions, 1 deletions
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;