forked from bartvdbraak/blender
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.
This commit is contained in:
parent
054c471a04
commit
3c5462e660
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user