diff options
author | Julian Eisel <eiseljulian@gmail.com> | 2015-07-09 20:48:03 +0300 |
---|---|---|
committer | Julian Eisel <eiseljulian@gmail.com> | 2015-07-09 20:48:03 +0300 |
commit | f766a61626b0d1616eb0298340d18eec8ca81777 (patch) | |
tree | b4d249b650617bb7ec976c151da4f31212b963e8 /source/blender/editors/space_file/file_draw.c | |
parent | aeeb23efa28dc16e207b168866fe60806f8faa2d (diff) |
File Browser: (Re-)Allow selecting '..' parent entry for file navigation
Selecting '..' entry was intentionally disabled in rB76b4fad6dbda1b10c, however, for file navigation this can be really useful. So this basically allows selecting '..' entry again, *if it is the only entry to select*. It won't be selected using box select, select all or when expanding selection.
Diffstat (limited to 'source/blender/editors/space_file/file_draw.c')
-rw-r--r-- | source/blender/editors/space_file/file_draw.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/source/blender/editors/space_file/file_draw.c b/source/blender/editors/space_file/file_draw.c index 7a3296d3f3d..028705a7529 100644 --- a/source/blender/editors/space_file/file_draw.c +++ b/source/blender/editors/space_file/file_draw.c @@ -557,10 +557,8 @@ 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; - /* readonly files (".." and ".") must not be drawn as selected - set color back to normal */ - if (FILENAME_IS_CURRPAR(file->relname)) { - colorid = TH_BACK; - } + BLI_assert(i > 0 || FILENAME_IS_CURRPAR(file->relname)); + draw_tile(sx, sy - 1, layout->tile_w + 4, sfile->layout->tile_h + layout->tile_border_y, colorid, shade); } } |