[Bf-blender-cvs] [79c668d] master: Correction to previous commit.

Bastien Montagne noreply at git.blender.org
Wed Sep 16 22:24:41 CEST 2015


Commit: 79c668dbec52f8834ac5013f254c12d8315d4924
Author: Bastien Montagne
Date:   Wed Sep 16 22:23:05 2015 +0200
Branches: master
https://developer.blender.org/rB79c668dbec52f8834ac5013f254c12d8315d4924

Correction to previous commit.

Mostly styling, but also str_exec would often remain undefined...

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

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

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

diff --git a/source/blender/editors/space_file/file_draw.c b/source/blender/editors/space_file/file_draw.c
index a77375a2..7d68e78 100644
--- a/source/blender/editors/space_file/file_draw.c
+++ b/source/blender/editors/space_file/file_draw.c
@@ -232,17 +232,16 @@ void file_draw_buttons(const bContext *C, ARegion *ar)
 	/* Execute / cancel buttons. */
 	if (loadbutton) {
 		const struct FileDirEntry *file = sfile->files ? filelist_file(sfile->files, params->active_file) : NULL;
-
 		char const *str_exec;
-		if (file) {
-			const bool is_parent_dir = (FILENAME_IS_PARENT(file->relpath));
-			if (is_parent_dir){
-				str_exec = IFACE_("Parent Directory");
-			} else if (file->typeflag & FILE_TYPE_DIR) {
-				str_exec = IFACE_("Open Directory");
-			}
-		} else {
-			str_exec = params->title; /* params->title is already translated! */
+
+		if (file && FILENAME_IS_PARENT(file->relpath)){
+			str_exec = IFACE_("Parent Directory");
+		}
+		else if (file && file->typeflag & FILE_TYPE_DIR) {
+			str_exec = IFACE_("Open Directory");
+		}
+		else {
+			str_exec = params->title;  /* params->title is already translated! */
 		}
 
 		uiDefButO(block, UI_BTYPE_BUT, "FILE_OT_execute", WM_OP_EXEC_REGION_WIN, str_exec,




More information about the Bf-blender-cvs mailing list