From 8fc1ad5d2e3bd19b2a7f81f347bed4a30d8aad25 Mon Sep 17 00:00:00 2001 From: Chris Want Date: Wed, 19 Mar 2003 05:29:07 +0000 Subject: [PATCH] Added a UI_BLOCK_ENTER_OK flag to the uiBlock in button() (this alleviates the problem where using the enter key effects the widget under the mouse cursor instead of doing an 'OK' (symptom: getting the wrong number of verts when adding a mesh circle). --- source/blender/src/toolbox.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/blender/src/toolbox.c b/source/blender/src/toolbox.c index 5c4b85864be..d84dedfd045 100644 --- a/source/blender/src/toolbox.c +++ b/source/blender/src/toolbox.c @@ -1093,7 +1093,8 @@ short button(short *var, short min, short max, char *str) if(mval[1]>G.curscreen->sizey) mval[1]= G.curscreen->sizey-10; block= uiNewBlock(&listb, "button", UI_EMBOSSX, UI_HELV, G.curscreen->mainwin); - uiBlockSetFlag(block, UI_BLOCK_LOOP|UI_BLOCK_REDRAW|UI_BLOCK_RET_1); + uiBlockSetFlag(block, UI_BLOCK_LOOP|UI_BLOCK_REDRAW|UI_BLOCK_RET_1| + UI_BLOCK_ENTER_OK); x1=mval[0]-150; y1=mval[1]-20;