diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-01-24 22:18:51 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-01-24 22:18:51 +0400 |
commit | 44850d69469342b9b11105dc87bdb47ab4234cff (patch) | |
tree | 7568403dee6a523a30db61e27db284e24ab87395 /source/blender/editors/space_file | |
parent | 8f7762c356b8a1d39fd8222b72d5c35ef66d8061 (diff) |
Fix #29946: Recover Auto Save defaults to "Short List" View -- Cannot determine dates
Added option display_type to WM_operator_properties_filesel which defines which file
display type (short/list/icons/default) should be used for file browser.
All current operators are using FILE_DEFAULTDISPLAY display type which means display
type will still be calculated based on type of opening file and user preferences
settings. Recover Auto Save operator is now using long display type so file date can
easily be checked now.
Reviewed by Andrea, thanks!
Diffstat (limited to 'source/blender/editors/space_file')
-rw-r--r-- | source/blender/editors/space_file/filesel.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/source/blender/editors/space_file/filesel.c b/source/blender/editors/space_file/filesel.c index bf31775a349..5b4e133e283 100644 --- a/source/blender/editors/space_file/filesel.c +++ b/source/blender/editors/space_file/filesel.c @@ -215,14 +215,19 @@ short ED_fileselect_set_params(SpaceFile *sfile) params->flag |= RNA_boolean_get(op->ptr, "autoselect") ? FILE_AUTOSELECT : 0; params->flag |= RNA_boolean_get(op->ptr, "active_layer") ? FILE_ACTIVELAY : 0; } - - if (U.uiflag & USER_SHOW_THUMBNAILS) { - if(params->filter & (IMAGEFILE|MOVIEFILE)) - params->display= FILE_IMGDISPLAY; - else + + if(RNA_struct_find_property(op->ptr, "display_type")) + params->display= RNA_enum_get(op->ptr, "display_type"); + + if(params->display==FILE_DEFAULTDISPLAY) { + if (U.uiflag & USER_SHOW_THUMBNAILS) { + if(params->filter & (IMAGEFILE|MOVIEFILE)) + params->display= FILE_IMGDISPLAY; + else + params->display= FILE_SHORTDISPLAY; + } else { params->display= FILE_SHORTDISPLAY; - } else { - params->display= FILE_SHORTDISPLAY; + } } if (is_relative_path) { |