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:
authorMatt Ebb <matt@mke3.net>2010-04-26 08:49:33 +0400
committerMatt Ebb <matt@mke3.net>2010-04-26 08:49:33 +0400
commit7bf3add0a533c6efb291757bd5db3135092f4f0d (patch)
tree14c201c053379bfda4f86fda9e62c941eff9ce70 /source/blender/editors/space_text
parentf85fe4d633a565106048f1e9511894d2539e78a6 (diff)
Add operator undo flags to text datablock related operators
Diffstat (limited to 'source/blender/editors/space_text')
-rw-r--r--source/blender/editors/space_text/text_ops.c14
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.");
}