Report when saving images and text

also fix bug where text saving would strip last newline
This commit is contained in:
2014-04-30 21:39:42 +10:00
parent 3803c646d8
commit 7829ef0051
2 changed files with 20 additions and 16 deletions

View File

@@ -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;