From deb180e37f324ab789ecbf608d08c9f031953749 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 16 Jul 2009 22:47:27 +0000 Subject: - Scrollbars for the console (use View2D functions) - Set View2D operators not to register, got in the way a lot with the console. - Made autocomplete Ctrl+Enter so Tab can be used. - Should work with python 2.5 now. (patch from Vilda) - Moved report struct definitions into DNA_windowmanager_types.h, could also have DNA_report_types.h however the reports are not saved, its just needed so the report list can be used in the wmWindowManager struct. Fixes a crash reported by ZanQdo. - Store the report message length in the report so calculating the total height including word wrap is not so slow. --- source/blender/blenkernel/intern/report.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'source/blender/blenkernel/intern/report.c') diff --git a/source/blender/blenkernel/intern/report.c b/source/blender/blenkernel/intern/report.c index 6564329ef82..3e3dd4b0af0 100644 --- a/source/blender/blenkernel/intern/report.c +++ b/source/blender/blenkernel/intern/report.c @@ -102,7 +102,7 @@ void BKE_report(ReportList *reports, ReportType type, const char *message) len= strlen(message); report->message= MEM_callocN(sizeof(char)*(len+1), "ReportMessage"); memcpy(report->message, message, sizeof(char)*(len+1)); - + report->len= len; BLI_addtail(&reports->list, report); } } @@ -129,7 +129,7 @@ void BKE_reportf(ReportList *reports, ReportType type, const char *format, ...) va_end(args); report->message= BLI_dynstr_get_cstring(ds); - + report->len= BLI_dynstr_get_len(ds); BLI_dynstr_free(ds); report->type= type; @@ -155,6 +155,7 @@ void BKE_reports_prepend(ReportList *reports, const char *prepend) MEM_freeN(report->message); report->message= BLI_dynstr_get_cstring(ds); + report->len= BLI_dynstr_get_len(ds); BLI_dynstr_free(ds); } @@ -179,6 +180,7 @@ void BKE_reports_prependf(ReportList *reports, const char *prepend, ...) MEM_freeN(report->message); report->message= BLI_dynstr_get_cstring(ds); + report->len= BLI_dynstr_get_len(ds); BLI_dynstr_free(ds); } -- cgit v1.2.3