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).
This commit is contained in:
Chris Want
2003-03-19 05:29:07 +00:00
parent 9ef2426be6
commit 8fc1ad5d2e

View File

@@ -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;