Fileselect window:
Pressing X to remove a file should not work in databrowse view.
This commit is contained in:
Ton Roosendaal 2008-09-14 09:09:10 +00:00
parent 375a6bbe41
commit 2bf26b93e1

@ -2062,18 +2062,20 @@ void winqreadfilespace(ScrArea *sa, void *spacedata, BWinEvent *evt)
break;
case XKEY:
test = get_hilited_entry(sfile);
if(sfile->type==FILE_BLENDER) {
test = get_hilited_entry(sfile);
if (test != -1 && !(S_ISDIR(sfile->filelist[test].type))){
BLI_make_file_string(G.sce, str, sfile->dir, sfile->filelist[test].relname);
if (test != -1 && !(S_ISDIR(sfile->filelist[test].type))){
BLI_make_file_string(G.sce, str, sfile->dir, sfile->filelist[test].relname);
if( okee("Remove %s", str) ) {
ret = BLI_delete(str, 0, 0);
if (ret) {
error("Command failed, see console");
} else {
freefilelist(sfile);
do_draw= 1;
if( okee("Remove %s", str) ) {
ret = BLI_delete(str, 0, 0);
if (ret) {
error("Command failed, see console");
} else {
freefilelist(sfile);
do_draw= 1;
}
}
}
}