diff options
author | Andrea Weikert <elubie@gmx.net> | 2009-07-28 22:20:16 +0400 |
---|---|---|
committer | Andrea Weikert <elubie@gmx.net> | 2009-07-28 22:20:16 +0400 |
commit | c645f3660d9361a0a9ca8b0fd55b54d2f5007835 (patch) | |
tree | f3ccddb7cd8840d32e7b8a4738275258eabf45aa | |
parent | 86336f5cdd2bbe607bbece162bddfade7062b305 (diff) |
2.5 file browser
* Bugfix: keep the filename when changing directory, either by clicking on it or by selecting a bookmark
* MSVC uninitialized variable runtime check fix in widget_draw_text
-rw-r--r-- | source/blender/editors/interface/interface_widgets.c | 2 | ||||
-rw-r--r-- | source/blender/editors/space_file/file_ops.c | 2 |
2 files changed, 1 insertions, 3 deletions
diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c index 485f8a2e1e7..cea3038b901 100644 --- a/source/blender/editors/interface/interface_widgets.c +++ b/source/blender/editors/interface/interface_widgets.c @@ -780,7 +780,7 @@ static void widget_draw_text(uiFontStyle *fstyle, uiWidgetColors *wcol, uiBut *b /* text button selection and cursor */ if(but->editstr && but->pos != -1) { - short t, pos, ch; + short t=0, pos=0, ch; short selsta_tmp, selend_tmp, selsta_draw, selwidth_draw; if ((but->selend - but->selsta) > 0) { diff --git a/source/blender/editors/space_file/file_ops.c b/source/blender/editors/space_file/file_ops.c index c515ef6e295..65a46d6514d 100644 --- a/source/blender/editors/space_file/file_ops.c +++ b/source/blender/editors/space_file/file_ops.c @@ -157,7 +157,6 @@ static FileSelect file_select(SpaceFile* sfile, ARegion* ar, const rcti* rect, s BLI_add_slash(params->dir); } - params->file[0] = '\0'; file_change_dir(sfile); retval = FILE_SELECT_DIR; } @@ -322,7 +321,6 @@ static int bookmark_select_invoke(bContext *C, wmOperator *op, wmEvent *event) BLI_strncpy(params->dir, entry, sizeof(params->dir)); BLI_cleanup_dir(G.sce, params->dir); file_change_dir(sfile); - params->file[0] = '\0'; WM_event_add_notifier(C, NC_FILE|ND_FILELIST, NULL); } |