diff options
author | Severin <julian_eisel@web.de> | 2015-03-09 04:25:29 +0300 |
---|---|---|
committer | Severin <julian_eisel@web.de> | 2015-03-09 04:27:11 +0300 |
commit | 573783259dcd852c56f7a56eb0e2284e8b56b352 (patch) | |
tree | a65a6888af4226c38030c98f0fad669a285e8c35 /source/blender/editors/interface | |
parent | 7d5d971dea5bfddaf41222190c43ae198dca6f9b (diff) |
IME: Disable IME for number buttons
Diffstat (limited to 'source/blender/editors/interface')
-rw-r--r-- | source/blender/editors/interface/interface_handlers.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c index 96973194576..a6ff5bb3ad3 100644 --- a/source/blender/editors/interface/interface_handlers.c +++ b/source/blender/editors/interface/interface_handlers.c @@ -2493,6 +2493,7 @@ static void ui_textedit_begin(bContext *C, uiBut *but, uiHandleButtonData *data) { wmWindow *win = CTX_wm_window(C); int len; + const bool is_num_but = ELEM(but->type, UI_BTYPE_NUM, UI_BTYPE_NUM_SLIDER); if (data->str) { MEM_freeN(data->str); @@ -2520,7 +2521,7 @@ static void ui_textedit_begin(bContext *C, uiBut *but, uiHandleButtonData *data) BLI_str_rstrip_float_zero(data->str, '\0'); } - if (ELEM(but->type, UI_BTYPE_NUM, UI_BTYPE_NUM_SLIDER)) { + if (is_num_but) { ui_but_convert_to_unit_alt_name(but, data->str, data->maxlen); } @@ -2551,7 +2552,9 @@ static void ui_textedit_begin(bContext *C, uiBut *but, uiHandleButtonData *data) WM_cursor_modal_set(win, BC_TEXTEDITCURSOR); #ifdef WITH_INPUT_IME - ui_textedit_ime_begin(win, but); + if (is_num_but == false) { + ui_textedit_ime_begin(win, but); + } #endif } |