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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2010-07-21 18:11:19 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2010-07-21 18:11:19 +0400
commitee6be64a2c0a8c0b04d71ec19fce239e519932e1 (patch)
treee5c82105a10a5597ac288d8c6d1ceec0db9dec06 /source/blender
parent8eb594b74be479eda1cddc28291d7df27aa70dd5 (diff)
Fix #22897: text insert operator only worked for one character,
now inserts the whole string.
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/editors/curve/editfont.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/source/blender/editors/curve/editfont.c b/source/blender/editors/curve/editfont.c
index 69ba432e778..20355de0e73 100644
--- a/source/blender/editors/curve/editfont.c
+++ b/source/blender/editors/curve/editfont.c
@@ -1229,7 +1229,7 @@ static int insert_text_exec(bContext *C, wmOperator *op)
Object *obedit= CTX_data_edit_object(C);
char *inserted_utf8;
wchar_t *inserted_text, first;
- int len;
+ int a, len;
if(!RNA_property_is_set(op->ptr, "text"))
return OPERATOR_CANCELLED;
@@ -1241,13 +1241,12 @@ static int insert_text_exec(bContext *C, wmOperator *op)
utf8towchar(inserted_text, inserted_utf8);
first= inserted_text[0];
+ for(a=0; a<len; a++)
+ insert_into_textbuf(obedit, inserted_text[a]);
+
MEM_freeN(inserted_text);
MEM_freeN(inserted_utf8);
- if(!first)
- return OPERATOR_CANCELLED;
-
- insert_into_textbuf(obedit, first);
kill_selection(obedit, 1);
text_update_edited(C, scene, obedit, 1, 0);