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:
authorAndrea Weikert <elubie@gmx.net>2010-05-09 01:02:22 +0400
committerAndrea Weikert <elubie@gmx.net>2010-05-09 01:02:22 +0400
commit5be1fd3592d78c21cafd86cfff69bd23578d77d9 (patch)
treeda7823816f0e9be6619079f9713544f2309dc736 /source/blender/editors/space_file/filesel.c
parent9aa39368cc2242dc2152ef21b2ed979d46d21f3a (diff)
== filebrowser ==
- smooth scrolling to editable button after new directory is created (for now scrolling starts as soon as the mouse moves back to the file list area, for Matt to check if immediate scrolling is possible) - fix for autocomplete directory, show first matching part if directory doesn't exist, otherwise won't work for directories starting with the same prefix like textures_walls and textures_grass for example.
Diffstat (limited to 'source/blender/editors/space_file/filesel.c')
-rw-r--r--source/blender/editors/space_file/filesel.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/space_file/filesel.c b/source/blender/editors/space_file/filesel.c
index 916f8dfcd62..f971e18043c 100644
--- a/source/blender/editors/space_file/filesel.c
+++ b/source/blender/editors/space_file/filesel.c
@@ -213,11 +213,11 @@ int ED_fileselect_layout_numfiles(FileLayout* layout, struct ARegion *ar)
if (layout->flag & FILE_LAYOUT_HOR) {
int width = ar->v2d.cur.xmax - ar->v2d.cur.xmin - 2*layout->tile_border_x;
- numfiles = width/layout->tile_w + 1;
+ numfiles = (float)width/(float)layout->tile_w+0.5;
return numfiles*layout->rows;
} else {
int height = ar->v2d.cur.ymax - ar->v2d.cur.ymin - 2*layout->tile_border_y;
- numfiles = height/layout->tile_h + 1;
+ numfiles = (float)height/(float)layout->tile_h+0.5;
return numfiles*layout->columns;
}
}
@@ -482,7 +482,7 @@ void autocomplete_directory(struct bContext *C, char *str, void *arg_v)
if (BLI_exists(str)) {
BLI_add_slash(str);
} else {
- BLI_make_exist(str);
+ BLI_strncpy(sfile->params->dir, str, sizeof(sfile->params->dir));
}
}
}