Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/editors/space_file/space_file.c')
-rw-r--r--source/blender/editors/space_file/space_file.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/editors/space_file/space_file.c b/source/blender/editors/space_file/space_file.c
index b19245cba06..b2fad2a387c 100644
--- a/source/blender/editors/space_file/space_file.c
+++ b/source/blender/editors/space_file/space_file.c
@@ -183,7 +183,9 @@ static void file_main_area_draw(const bContext *C, ARegion *ar)
{
/* draw entirely, view changes should be handled here */
SpaceFile *sfile= (SpaceFile*)CTX_wm_space_data(C);
- FileSelectParams* params = sfile->params;
+ FileSelectParams *params = ED_fileselect_get_params(sfile);
+ FileLayout *layout=NULL;
+
View2D *v2d= &ar->v2d;
View2DScrollers *scrollers;
float col[3];
@@ -195,6 +197,8 @@ static void file_main_area_draw(const bContext *C, ARegion *ar)
params->active_file = -1; // added this so it opens nicer (ton)
}
+ layout = ED_fileselect_get_layout(sfile, ar);
+
if (filelist_empty(sfile->files))
{
unsigned int filter = 0;
@@ -217,7 +221,7 @@ static void file_main_area_draw(const bContext *C, ARegion *ar)
glClear(GL_COLOR_BUFFER_BIT);
/* Allow dynamically sliders to be set, saves notifiers etc. */
- if (sfile->params && ( (sfile->params->display == FILE_IMGDISPLAY) || (sfile->params->display == FILE_LONGDISPLAY)) ) {
+ if (layout && (layout->flag == FILE_LAYOUT_VER)) {
v2d->scroll = V2D_SCROLL_RIGHT;
v2d->keepofs &= ~V2D_LOCKOFS_Y;
v2d->keepofs |= V2D_LOCKOFS_X;