diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-04-30 15:39:42 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-04-30 15:43:11 +0400 |
commit | 7829ef0051a16c1af88f72d99c329f5c75dd3eea (patch) | |
tree | 10513154ed31554c44286ebbb653edb64656b0a5 /source/blender/editors/space_text/text_ops.c | |
parent | 3803c646d8e8277d4d51473b03ac3153646a3493 (diff) |
Report when saving images and text
also fix bug where text saving would strip last newline
Diffstat (limited to 'source/blender/editors/space_text/text_ops.c')
-rw-r--r-- | source/blender/editors/space_text/text_ops.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/editors/space_text/text_ops.c b/source/blender/editors/space_text/text_ops.c index 4835ef711e9..7b4481cfc7f 100644 --- a/source/blender/editors/space_text/text_ops.c +++ b/source/blender/editors/space_text/text_ops.c @@ -472,18 +472,18 @@ static void txt_write_file(Text *text, ReportList *reports) return; } - tmp = text->lines.first; - while (tmp) { - if (tmp->next) fprintf(fp, "%s\n", tmp->line); - else fprintf(fp, "%s", tmp->line); - - tmp = tmp->next; + for (tmp = text->lines.first; tmp; tmp = tmp->next) { + fputs(tmp->line, fp); + fputc('\n', fp); } fclose(fp); if (BLI_stat(filepath, &st) == 0) { text->mtime = st.st_mtime; + + /* report since this can be called from key-shortcuts */ + BKE_reportf(reports, RPT_INFO, "Saved Text '%s'", filepath); } else { text->mtime = 0; |