diff options
author | Ton Roosendaal <ton@blender.org> | 2004-04-08 01:08:28 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2004-04-08 01:08:28 +0400 |
commit | a93a6966b7a356199f63562dd7dfdd8a8dfdea43 (patch) | |
tree | 82aa31a33459b1bc088f173343527777fe4bcc7c /source/blender/src/drawtext.c | |
parent | 6710a87b5a5ab531c0ab3e0bcebc5fc78be38739 (diff) |
bug fix 799
Solved by Styken, thanks dude!
the winqreadtextspace() function wants CTRL/ALT events, but also should
accept special characters that are sometimes behind an ALT on certain
keyboards (like [ ] in sweden).
In the old code all ALT events caused ascii to set on zero. Now it
checks first for ispunct() chars.
Diffstat (limited to 'source/blender/src/drawtext.c')
-rw-r--r-- | source/blender/src/drawtext.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/src/drawtext.c b/source/blender/src/drawtext.c index 98f724f4949..7ec357637a3 100644 --- a/source/blender/src/drawtext.c +++ b/source/blender/src/drawtext.c @@ -979,8 +979,9 @@ void winqreadtextspace(ScrArea *sa, void *spacedata, BWinEvent *evt) Text *text= st->text; int do_draw=0, p; - /* smartass code to prevent the events below from not working! */ - if (!isprint(ascii) || (G.qual & ~LR_SHIFTKEY)) ascii= 0; + /* smartass code to prevent the CTRL/ALT events below from not working! */ + if(!ispunct(ascii)) + if (!isprint(ascii) || (G.qual & ~LR_SHIFTKEY)) ascii= 0; text= st->text; |