Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Parborg <darkdefende@gmail.com>2020-03-26 14:42:37 +0300
committerSebastian Parborg <darkdefende@gmail.com>2020-03-26 14:45:09 +0300
commit08b9b95147a983af492f0f9db948b680590b448d (patch)
tree7f0f64fd3e1182ec100ca3b1532f96887b71ffda /source/blender/editors/util/numinput.c
parent90e8f94558ed8f233f536c37c3bc98e0f969b517 (diff)
Fix T75047: Number input advanced mode is not working in JP keyboard
Check for special ascii values for number input first so that we can quickly decide if we should go into advanced mode. Reviewed By: Bastien
Diffstat (limited to 'source/blender/editors/util/numinput.c')
-rw-r--r--source/blender/editors/util/numinput.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/source/blender/editors/util/numinput.c b/source/blender/editors/util/numinput.c
index 3c0d0beebe3..be1319c37dd 100644
--- a/source/blender/editors/util/numinput.c
+++ b/source/blender/editors/util/numinput.c
@@ -340,6 +340,21 @@ bool handleNumInput(bContext *C, NumInput *n, const wmEvent *event)
}
}
+#ifdef USE_FAKE_EDIT
+ /* XXX Hack around keyboards without direct access to '=' nor '*'... */
+ if (ELEM(event->ascii, '=', '*')) {
+ if (!(n->flag & NUM_EDIT_FULL)) {
+ n->flag |= NUM_EDIT_FULL;
+ n->val_flag[idx] |= NUM_EDITED;
+ return true;
+ }
+ else if (event->ctrl) {
+ n->flag &= ~NUM_EDIT_FULL;
+ return true;
+ }
+ }
+#endif
+
switch (event->type) {
case EVT_MODAL_MAP:
if (ELEM(event->val, NUM_MODAL_INCREMENT_UP, NUM_MODAL_INCREMENT_DOWN)) {
@@ -523,21 +538,6 @@ bool handleNumInput(bContext *C, NumInput *n, const wmEvent *event)
ascii[0] = event->ascii;
}
-#ifdef USE_FAKE_EDIT
- /* XXX Hack around keyboards without direct access to '=' nor '*'... */
- if (ELEM(ascii[0], '=', '*')) {
- if (!(n->flag & NUM_EDIT_FULL)) {
- n->flag |= NUM_EDIT_FULL;
- n->val_flag[idx] |= NUM_EDITED;
- return true;
- }
- else if (event->ctrl) {
- n->flag &= ~NUM_EDIT_FULL;
- return true;
- }
- }
-#endif
-
/* Up to this point, if we have a ctrl modifier, skip.
* This allows to still access most of modals' shortcuts even in numinput mode.
*/