From 8dca5010453f4a5709af148bc7ebf144d52d058b Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 21 Feb 2013 17:14:27 +0000 Subject: [PATCH] code cleanup: remove ctrl option from FONT_OT_line_break (which in fact wasn't mapped to ctrl), it would add in a non printable character '1' / ascii-SOH, traced back to original commit and theres no comments about this or mentions as to what its supposed to do). --- source/blender/editors/curve/editfont.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/source/blender/editors/curve/editfont.c b/source/blender/editors/curve/editfont.c index 257dfca051f..af6b90a9958 100644 --- a/source/blender/editors/curve/editfont.c +++ b/source/blender/editors/curve/editfont.c @@ -1070,21 +1070,13 @@ void FONT_OT_change_character(wmOperatorType *ot) /******************* line break operator ********************/ -static int line_break_exec(bContext *C, wmOperator *op) +static int line_break_exec(bContext *C, wmOperator *UNUSED(op)) { Scene *scene = CTX_data_scene(C); Object *obedit = CTX_data_edit_object(C); Curve *cu = obedit->data; - EditFont *ef = cu->editfont; - const int ctrl = RNA_boolean_get(op->ptr, "ctrl"); - if (ctrl) { - insert_into_textbuf(obedit, 1); - if (ef->textbuf[cu->pos] != '\n') - insert_into_textbuf(obedit, '\n'); - } - else - insert_into_textbuf(obedit, '\n'); + insert_into_textbuf(obedit, '\n'); cu->selstart = cu->selend = 0; @@ -1106,9 +1098,6 @@ void FONT_OT_line_break(wmOperatorType *ot) /* flags */ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; - - /* properties */ - RNA_def_boolean(ot->srna, "ctrl", 0, "Ctrl", ""); // XXX what is this? } /******************* delete operator **********************/