diff options
author | Matt Ebb <matt@mke3.net> | 2010-04-26 08:49:33 +0400 |
---|---|---|
committer | Matt Ebb <matt@mke3.net> | 2010-04-26 08:49:33 +0400 |
commit | 7bf3add0a533c6efb291757bd5db3135092f4f0d (patch) | |
tree | 14c201c053379bfda4f86fda9e62c941eff9ce70 /source/blender | |
parent | f85fe4d633a565106048f1e9511894d2539e78a6 (diff) |
Add operator undo flags to text datablock related operators
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/editors/space_text/text_ops.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/source/blender/editors/space_text/text_ops.c b/source/blender/editors/space_text/text_ops.c index 8cb2b4be628..8382e963523 100644 --- a/source/blender/editors/space_text/text_ops.c +++ b/source/blender/editors/space_text/text_ops.c @@ -190,6 +190,9 @@ void TEXT_OT_new(wmOperatorType *ot) /* api callbacks */ ot->exec= new_exec; ot->poll= text_new_poll; + + /* flags */ + ot->flag= OPTYPE_UNDO; } /******************* open operator *********************/ @@ -288,6 +291,9 @@ void TEXT_OT_open(wmOperatorType *ot) ot->cancel= open_cancel; ot->poll= text_new_poll; + /* flags */ + ot->flag= OPTYPE_UNDO; + /* properties */ WM_operator_properties_filesel(ot, FOLDERFILE|TEXTFILE|PYSCRIPTFILE, FILE_SPECIAL, FILE_OPENFILE); RNA_def_boolean(ot->srna, "internal", 0, "Make internal", "Make text file internal after loading"); @@ -369,6 +375,9 @@ void TEXT_OT_unlink(wmOperatorType *ot) ot->exec= unlink_exec; ot->invoke= WM_operator_confirm; ot->poll= text_edit_poll; + + /* flags */ + ot->flag= OPTYPE_UNDO; } /******************* make internal operator *********************/ @@ -400,6 +409,9 @@ void TEXT_OT_make_internal(wmOperatorType *ot) /* api callbacks */ ot->exec= make_internal_exec; ot->poll= text_edit_poll; + + /* flags */ + ot->flag= OPTYPE_UNDO; } /******************* save operator *********************/ @@ -749,7 +761,7 @@ void TEXT_OT_paste(wmOperatorType *ot) /* api callbacks */ ot->exec= paste_exec; ot->poll= text_edit_poll; - + /* properties */ RNA_def_boolean(ot->srna, "selection", 0, "Selection", "Paste text selected elsewhere rather than copied, X11 only."); } |