diff options
author | Campbell Barton <ideasman42@gmail.com> | 2008-03-31 12:30:10 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2008-03-31 12:30:10 +0400 |
commit | 8f48888bff3a782a40a8a8409df6b7be190d5e4a (patch) | |
tree | 63caaf1b35ad6b322671b00efadedb32ad493da2 /source/blender/src/filesel.c | |
parent | 5b73d96fd54f8572ca24ac67969713115376435b (diff) |
fix for [#8795] Unable to load an image into Image Texture Type
Diffstat (limited to 'source/blender/src/filesel.c')
-rw-r--r-- | source/blender/src/filesel.c | 31 |
1 files changed, 17 insertions, 14 deletions
diff --git a/source/blender/src/filesel.c b/source/blender/src/filesel.c index eeae352267e..e72e8773602 100644 --- a/source/blender/src/filesel.c +++ b/source/blender/src/filesel.c @@ -1890,22 +1890,25 @@ void winqreadfilespace(ScrArea *sa, void *spacedata, BWinEvent *evt) sfile->ofs= 0; do_draw= 1; } - } - else { - if( strcmp(sfile->file, sfile->filelist[act].relname)) { - 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); - /* printf ("%s\n", tmpstr); */ - #ifdef INTERNATIONAL - if (!FTF_GetNewFont ((const unsigned char *)tmpstr, 0, U.fontsize)) - error ("No font file"); - #endif + } else { + if(event==MIDDLEMOUSE && sfile->type) filesel_execute(sfile); +#ifdef INTERNATIONAL + else if (sfile->type==FILE_LOADFONT) { + /* Font Preview */ + if( strcmp(sfile->file, sfile->filelist[act].relname)) { + 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)) + error ("No font file"); + + } } } - if(event==MIDDLEMOUSE && sfile->type) filesel_execute(sfile); +#endif } } } |