Revision: 30585 http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=30585 Author: blendix Date: 2010-07-21 16:11:19 +0200 (Wed, 21 Jul 2010)
Log Message: ----------- Fix #22897: text insert operator only worked for one character, now inserts the whole string. Modified Paths: -------------- trunk/blender/source/blender/editors/curve/editfont.c Modified: trunk/blender/source/blender/editors/curve/editfont.c =================================================================== --- trunk/blender/source/blender/editors/curve/editfont.c 2010-07-21 14:09:45 UTC (rev 30584) +++ trunk/blender/source/blender/editors/curve/editfont.c 2010-07-21 14:11:19 UTC (rev 30585) @@ -1229,7 +1229,7 @@ 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 @@ 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); _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org http://lists.blender.org/mailman/listinfo/bf-blender-cvs