diff options
author | Sybren A. Stüvel <sybren@stuvel.eu> | 2018-04-11 16:06:42 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@stuvel.eu> | 2018-04-11 16:06:42 +0300 |
commit | 8aa6e4d50bfcc0d83985f783228408586b0f877b (patch) | |
tree | b6f1e5badf6da9c5fbfe6bba9986949f2f8d0db0 | |
parent | 5a3c146652b7e5d1b5e1b45bdced0d8c2d3c2554 (diff) |
Changed assertion of '..' in file browser entries
The previous assert assumed '..' is always there, which isn't necessarily
true (for example when in the root of an Asset Engine repository).
The new code asserts that if '..' is present it should be the first entry
(rather than forcing the first entry to be '..').
-rw-r--r-- | source/blender/editors/space_file/file_draw.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/editors/space_file/file_draw.c b/source/blender/editors/space_file/file_draw.c index 52d01063175..396f3cf32f4 100644 --- a/source/blender/editors/space_file/file_draw.c +++ b/source/blender/editors/space_file/file_draw.c @@ -597,7 +597,7 @@ void file_draw_list(const bContext *C, ARegion *ar) int colorid = (file_selflag & FILE_SEL_SELECTED) ? TH_HILITE : TH_BACK; int shade = (params->highlight_file == i) || (file_selflag & FILE_SEL_HIGHLIGHTED) ? 35 : 0; - BLI_assert(i > 0 || FILENAME_IS_CURRPAR(file->relpath)); + BLI_assert(i == 0 || !FILENAME_IS_CURRPAR(file->relpath)); draw_tile(sx, sy - 1, layout->tile_w + 4, sfile->layout->tile_h + layout->tile_border_y, colorid, shade); } |