diff options
author | Ton Roosendaal <ton@blender.org> | 2010-12-10 16:31:59 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2010-12-10 16:31:59 +0300 |
commit | 9aace59708c6cf5471c661feb6207f1eca923a17 (patch) | |
tree | 516d4713bcc449562c63199acac19d5554eb660f /source/blender/editors/curve/editfont.c | |
parent | 5854cfa5b8b1af7c451b56482a0a2b54b6c679de (diff) |
IRC report fix:
Text edit mode (3d): brought back the ALT+Backspace mode for
typing accented characters. Works with an operator property,
so the hotkey for it is free to define.
Example: type 'a', alt+backspace and then 'o'
works to combine characters with ' ` ~ o / and ^
Diffstat (limited to 'source/blender/editors/curve/editfont.c')
-rw-r--r-- | source/blender/editors/curve/editfont.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/source/blender/editors/curve/editfont.c b/source/blender/editors/curve/editfont.c index ef49abd4dbd..0010332c8d9 100644 --- a/source/blender/editors/curve/editfont.c +++ b/source/blender/editors/curve/editfont.c @@ -1259,6 +1259,12 @@ static int insert_text_invoke(bContext *C, wmOperator *op, wmEvent *evt) if(RNA_property_is_set(op->ptr, "text")) return insert_text_exec(C, op); + + if(RNA_property_is_set(op->ptr, "accent")) { + if(cu->len!=0 && cu->pos>0) + accentcode= 1; + return OPERATOR_FINISHED; + } /* tab should exit editmode, but we allow it to be typed using modifier keys */ if(event==TABKEY) { @@ -1333,6 +1339,9 @@ static int insert_text_invoke(bContext *C, wmOperator *op, wmEvent *evt) RNA_string_set(op->ptr, "text", inserted_utf8); } + /* reset property? */ + accentcode= 0; + return OPERATOR_FINISHED; } @@ -1353,6 +1362,7 @@ void FONT_OT_text_insert(wmOperatorType *ot) /* properties */ RNA_def_string(ot->srna, "text", "", 0, "Text", "Text to insert at the cursor position."); + RNA_def_boolean(ot->srna, "accent", 0, "Accent mode", "Next typed character will strike through previous, for special character input."); } |