[Bf-blender-cvs] [952ef0f] asset-experiments: Fix newly created dir not going into rename state anymore.

Bastien Montagne noreply at git.blender.org
Wed May 13 14:08:23 CEST 2015


Commit: 952ef0fedfda5a2f941fe4ea87b4ece25861ba75
Author: Bastien Montagne
Date:   Wed May 13 14:07:49 2015 +0200
Branches: asset-experiments
https://developer.blender.org/rB952ef0fedfda5a2f941fe4ea87b4ece25861ba75

Fix newly created dir not going into rename state anymore.

Due to async dir listing...

===================================================================

M	source/blender/editors/space_file/space_file.c

===================================================================

diff --git a/source/blender/editors/space_file/space_file.c b/source/blender/editors/space_file/space_file.c
index d235131..188b834 100644
--- a/source/blender/editors/space_file/space_file.c
+++ b/source/blender/editors/space_file/space_file.c
@@ -277,7 +277,11 @@ static void file_refresh(const bContext *C, ScrArea *sa)
 			}
 		}
 		BLI_strncpy(sfile->params->renameedit, sfile->params->renamefile, sizeof(sfile->params->renameedit));
-		params->renamefile[0] = '\0';
+		/* File listing is now async, do not clear renamefile if matching entry not found
+		 * and dirlist is not finished! */
+		if (idx >= 0 || filelist_is_ready(sfile->files)) {
+			params->renamefile[0] = '\0';
+		}
 	}
 
 	if (sfile->layout) {




More information about the Bf-blender-cvs mailing list