forked from bartvdbraak/blender
Fix #27850: keyboards with a comma instead of a dot on the numpad now get
converted to a dot when typing into number buttons, for easier number entry.
This commit is contained in:
parent
cf43e48fc7
commit
ca2c319649
@ -1895,7 +1895,15 @@ static void ui_do_but_textedit(bContext *C, uiBlock *block, uiBut *but, uiHandle
|
||||
}
|
||||
|
||||
if(event->ascii && (retval == WM_UI_HANDLER_CONTINUE)) {
|
||||
changed= ui_textedit_type_ascii(but, data, event->ascii);
|
||||
char ascii = event->ascii;
|
||||
|
||||
/* exception that's useful for number buttons, some keyboard
|
||||
numpads have a comma instead of a period */
|
||||
if(ELEM3(but->type, NUM, NUMABS, NUMSLI))
|
||||
if(event->type == PADPERIOD && ascii == ',')
|
||||
ascii = '.';
|
||||
|
||||
changed= ui_textedit_type_ascii(but, data, ascii);
|
||||
retval= WM_UI_HANDLER_BREAK;
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user