diff options
author | Campbell Barton <ideasman42@gmail.com> | 2008-03-31 18:57:09 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2008-03-31 18:57:09 +0400 |
commit | fe2d134a0724864afb1531ed95872fa53c84920e (patch) | |
tree | 9332d1056209b48a6f6fb9fd1622b15c467c2109 /source | |
parent | 009e5d00cb2a76694d42f5e47a3ac3cb6afa595e (diff) |
fix for odd error with image loading broke normal file loading
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/src/filesel.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/source/blender/src/filesel.c b/source/blender/src/filesel.c index e72e8773602..31d9b95d660 100644 --- a/source/blender/src/filesel.c +++ b/source/blender/src/filesel.c @@ -1414,7 +1414,6 @@ static void filesel_execute(SpaceFile *sfile) struct direntry *files; char name[FILE_MAX]; int a; - int dirlen, filelen; /* check for added length of dir and filename - annoying, but now that dir names can already be FILE_MAX we need to prevent overwriting. Alternative of shortening the name behind the user's back is greater evil @@ -1891,24 +1890,25 @@ void winqreadfilespace(ScrArea *sa, void *spacedata, BWinEvent *evt) do_draw= 1; } } else { - if(event==MIDDLEMOUSE && sfile->type) filesel_execute(sfile); + if( strcmp(sfile->file, sfile->filelist[act].relname)) { + BLI_strncpy(sfile->file, sfile->filelist[act].relname, sizeof(sfile->file)); + do_draw = 1; + #ifdef INTERNATIONAL - else if (sfile->type==FILE_LOADFONT) { - /* Font Preview */ - if( strcmp(sfile->file, sfile->filelist[act].relname)) { + if (sfile->type==FILE_LOADFONT && event!=MIDDLEMOUSE) { + /* Font Preview */ char tmpstr[240]; - do_draw= 1; - BLI_strncpy(sfile->file, sfile->filelist[act].relname, sizeof(sfile->file)); if (sfile->f_fp) { sprintf (tmpstr, "%s%s", sfile->dir, sfile->file); - if (!FTF_GetNewFont ((const unsigned char *)tmpstr, 0, U.fontsize)) + if (!FTF_GetNewFont ((const unsigned char *)tmpstr, 0, U.fontsize)) { error ("No font file"); - + } } } - } #endif + } + if(event==MIDDLEMOUSE && sfile->type) filesel_execute(sfile); } } } |