[Bf-blender-cvs] [8cb4011] master: Revert "Fix file size not drawn using Link/Append"

Campbell Barton noreply at git.blender.org
Tue Feb 17 01:37:07 CET 2015


Commit: 8cb4011220bffae553b7719556d5ee2f4e642b23
Author: Campbell Barton
Date:   Tue Feb 17 11:32:09 2015 +1100
Branches: master
https://developer.blender.org/rB8cb4011220bffae553b7719556d5ee2f4e642b23

Revert "Fix file size not drawn using Link/Append"

This reverts commit 4ca4f04c75c456d3614855ebaa70bab9a92eb36a.

Was running an fs-stat on redraw, on every file! (every mouse motion!).
Could become very slow on network-fs

also caused crash (T43631)

===================================================================

M	source/blender/editors/space_file/file_draw.c

===================================================================

diff --git a/source/blender/editors/space_file/file_draw.c b/source/blender/editors/space_file/file_draw.c
index a00799c..98c7dde 100644
--- a/source/blender/editors/space_file/file_draw.c
+++ b/source/blender/editors/space_file/file_draw.c
@@ -592,7 +592,7 @@ void file_draw_list(const bContext *C, ARegion *ar)
 
 		if (params->display == FILE_SHORTDISPLAY) {
 			sx += (int)layout->column_widths[COLUMN_NAME] + column_space;
-			if ((BLI_is_dir(file->path) == false) && file->size[0]) {
+			if (!(file->type & S_IFDIR)) {
 				file_draw_string(sx, sy, file->size, layout->column_widths[COLUMN_SIZE], layout->tile_h, align);
 				sx += (int)layout->column_widths[COLUMN_SIZE] + column_space;
 			}
@@ -621,7 +621,7 @@ void file_draw_list(const bContext *C, ARegion *ar)
 			file_draw_string(sx, sy, file->time, layout->column_widths[COLUMN_TIME], layout->tile_h, align);
 			sx += (int)layout->column_widths[COLUMN_TIME] + column_space;
 
-			if ((BLI_is_dir(file->path) == false) && file->size[0]) {
+			if (!(file->type & S_IFDIR)) {
 				file_draw_string(sx, sy, file->size, layout->column_widths[COLUMN_SIZE], layout->tile_h, align);
 				sx += (int)layout->column_widths[COLUMN_SIZE] + column_space;
 			}




More information about the Bf-blender-cvs mailing list