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:
authorTon Roosendaal <ton@blender.org>2010-12-20 21:29:32 +0300
committerTon Roosendaal <ton@blender.org>2010-12-20 21:29:32 +0300
commit8017a9513be58454b10c324bc729d53880e3f9b5 (patch)
tree4bf058d26869c945957484148cb736c553bd2a53 /source/blender/editors/space_file
parent28db3053fd762888f32d3c74246faa8080416e1d (diff)
Bugfix, own collection:
File Window draw error: On start Blender in smaller sized window, a scalled down screen causes the File Window main area to draw too high, clipping off half of the top line. This case (scroll horizontal only) is not handled as view2d type.
Diffstat (limited to 'source/blender/editors/space_file')
-rw-r--r--source/blender/editors/space_file/space_file.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/editors/space_file/space_file.c b/source/blender/editors/space_file/space_file.c
index b46704c8a6b..12cca144d80 100644
--- a/source/blender/editors/space_file/space_file.c
+++ b/source/blender/editors/space_file/space_file.c
@@ -327,6 +327,13 @@ static void file_main_area_draw(const bContext *C, ARegion *ar)
v2d->scroll = V2D_SCROLL_BOTTOM;
v2d->keepofs &= ~V2D_LOCKOFS_X;
v2d->keepofs |= V2D_LOCKOFS_Y;
+
+ /* XXX this happens on scaling down Screen (like from startup.blend) */
+ /* view2d has no type specific for filewindow case, which doesnt scroll vertically */
+ if(v2d->cur.ymax < 0) {
+ v2d->cur.ymin -= v2d->cur.ymax;
+ v2d->cur.ymax= 0;
+ }
}
/* v2d has initialized flag, so this call will only set the mask correct */
UI_view2d_region_reinit(v2d, V2D_COMMONVIEW_LIST, ar->winx, ar->winy);