File Browser

* Fix warning for non-existing "relative_paths" property.
* Fix problem where the image browser would keep trying to
  load images it failed opening.
This commit is contained in:
Brecht Van Lommel
2009-09-16 18:07:49 +00:00
parent 6156248051
commit 4596f0ee5e
2 changed files with 8 additions and 5 deletions

View File

@@ -531,9 +531,10 @@ int file_exec(bContext *C, wmOperator *unused)
RNA_string_set(op->ptr, "directory", name);
strcat(name, sfile->params->file);
if ( RNA_boolean_get(op->ptr, "relative_paths") ) {
BLI_makestringcode(G.sce, name);
}
if(RNA_struct_find_property(op->ptr, "relative_paths"))
if(RNA_boolean_get(op->ptr, "relative_paths"))
BLI_makestringcode(G.sce, name);
RNA_string_set(op->ptr, "path", name);
/* some ops have multiple files to select */

View File

@@ -592,10 +592,12 @@ void filelist_loadimage_timer(struct FileList* filelist)
}
if (limg->done) {
FileImage *oimg = limg;
BLI_remlink(&filelist->loadimages, oimg);
BLI_remove_thread(&filelist->threads, oimg);
/* brecht: keep failed images in the list, otherwise
it keeps trying to load them over and over?
BLI_remlink(&filelist->loadimages, oimg);
MEM_freeN(oimg);*/
limg = oimg->next;
MEM_freeN(oimg);
refresh = 1;
} else {
limg= limg->next;