diff options
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; |