diff options
author | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2010-08-09 15:32:55 +0400 |
---|---|---|
committer | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2010-08-09 15:32:55 +0400 |
commit | dd75ec490761640571a0d8e53a0d439091f2736f (patch) | |
tree | 25b3966862febbf3ee8c81ed45f7045c99f84016 /source/blender/editors/space_text/text_ops.c | |
parent | 02b0967bd11dd6fd2454b37182d9f94ea451b603 (diff) | |
parent | c026b8066ddc1c42144d2e5132384ea7c1211050 (diff) |
Merged changes in the trunk up to revision 31190.
Diffstat (limited to 'source/blender/editors/space_text/text_ops.c')
-rw-r--r-- | source/blender/editors/space_text/text_ops.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/source/blender/editors/space_text/text_ops.c b/source/blender/editors/space_text/text_ops.c index 7a3f0ff80e5..0e0a9592104 100644 --- a/source/blender/editors/space_text/text_ops.c +++ b/source/blender/editors/space_text/text_ops.c @@ -34,19 +34,17 @@ #include "MEM_guardedalloc.h" -#include "DNA_constraint_types.h" #include "DNA_text_types.h" +#include "DNA_userdef_types.h" #include "BLI_blenlib.h" #include "PIL_time.h" #include "BKE_context.h" -#include "BKE_depsgraph.h" #include "BKE_global.h" #include "BKE_library.h" #include "BKE_main.h" #include "BKE_report.h" -#include "BKE_suggestions.h" #include "BKE_text.h" #include "WM_api.h" @@ -583,14 +581,17 @@ void TEXT_OT_run_script(wmOperatorType *ot) /* api callbacks */ ot->poll= run_script_poll; ot->exec= run_script_exec; -} + /* flags */ + ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; +} /******************* refresh pyconstraints operator *********************/ static int refresh_pyconstraints_exec(bContext *C, wmOperator *op) { #ifndef DISABLE_PYTHON +#if 0 Text *text= CTX_data_edit_text(C); Object *ob; bConstraint *con; @@ -625,6 +626,7 @@ static int refresh_pyconstraints_exec(bContext *C, wmOperator *op) } } #endif +#endif return OPERATOR_FINISHED; } @@ -2363,6 +2365,7 @@ static int find_and_replace(bContext *C, wmOperator *op, short mode) SpaceText *st= CTX_wm_space_text(C); Text *start= NULL, *text= st->text; int flags, first= 1; + int found = 0; char *tmp; if(!st->findstr[0] || (mode == TEXT_REPLACE && !st->replacestr[0])) @@ -2428,9 +2431,10 @@ static int find_and_replace(bContext *C, wmOperator *op, short mode) first= 1; } else { - BKE_reportf(op->reports, RPT_ERROR, "Text not found: %s", st->findstr); + if(!found) BKE_reportf(op->reports, RPT_ERROR, "Text not found: %s", st->findstr); break; } + found = 1; } while(mode==TEXT_MARK_ALL); return OPERATOR_FINISHED; |