diff options
author | Andrea Weikert <elubie@gmx.net> | 2013-08-24 16:53:47 +0400 |
---|---|---|
committer | Andrea Weikert <elubie@gmx.net> | 2013-08-24 16:53:47 +0400 |
commit | b187c1be4b07dd6c70c112f8b5496ff0773c0cb9 (patch) | |
tree | 9b0b4030bacbffaa9917e2c511b73e5a6e39db8a /source/blender/editors/space_file | |
parent | f3ceee51fa3ebf60a05909ff95225e4d5df6dc5a (diff) |
== filebrowser ==
* fix old bug: wrong layout that could happen when switching between thumbnail view and list view. This caused the layout to be recalculated sometimes and the items being moved. Reason was that the layout was wrongly initialized without the scroll bars, so calculated wrongly.
Diffstat (limited to 'source/blender/editors/space_file')
-rw-r--r-- | source/blender/editors/space_file/space_file.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/source/blender/editors/space_file/space_file.c b/source/blender/editors/space_file/space_file.c index 6f3d0367574..04755c7220d 100644 --- a/source/blender/editors/space_file/space_file.c +++ b/source/blender/editors/space_file/space_file.c @@ -148,7 +148,6 @@ static void file_free(SpaceLink *sl) static void file_init(wmWindowManager *UNUSED(wm), ScrArea *sa) { SpaceFile *sfile = (SpaceFile *)sa->spacedata.first; - //printf("file_init\n"); /* refresh system directory list */ fsmenu_refresh_system_category(fsmenu_get()); @@ -313,7 +312,6 @@ static void file_main_area_draw(const bContext *C, ARegion *ar) /* draw entirely, view changes should be handled here */ SpaceFile *sfile = CTX_wm_space_file(C); FileSelectParams *params = ED_fileselect_get_params(sfile); - FileLayout *layout = NULL; View2D *v2d = &ar->v2d; View2DScrollers *scrollers; @@ -323,15 +321,14 @@ static void file_main_area_draw(const bContext *C, ARegion *ar) if (!sfile->files || filelist_empty(sfile->files)) file_refresh(C, NULL); - layout = ED_fileselect_get_layout(sfile, ar); - /* clear and setup matrix */ UI_GetThemeColor3fv(TH_BACK, col); glClearColor(col[0], col[1], col[2], 0.0); glClear(GL_COLOR_BUFFER_BIT); /* Allow dynamically sliders to be set, saves notifiers etc. */ - if (layout && (layout->flag == FILE_LAYOUT_VER)) { + + if (params && (params->display == FILE_IMGDISPLAY)) { v2d->scroll = V2D_SCROLL_RIGHT; v2d->keepofs &= ~V2D_LOCKOFS_Y; v2d->keepofs |= V2D_LOCKOFS_X; |