[Bf-blender-cvs] [e2e567e0b43] master: Fix file browser new directory prompting for confirmation

Brecht Van Lommel noreply at git.blender.org
Mon Sep 23 16:46:15 CEST 2019


Commit: e2e567e0b43f0f354caceb6ac493a2f4a3f1e130
Author: Brecht Van Lommel
Date:   Mon Sep 23 16:44:06 2019 +0200
Branches: master
https://developer.blender.org/rBe2e567e0b43f0f354caceb6ac493a2f4a3f1e130

Fix file browser new directory prompting for confirmation

This is only needed for the case where it's automatically done when entering a
file path that does not exist, not when pressing the button.

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

M	release/scripts/startup/bl_ui/space_filebrowser.py

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

diff --git a/release/scripts/startup/bl_ui/space_filebrowser.py b/release/scripts/startup/bl_ui/space_filebrowser.py
index 3279271b5e8..c0d954261f6 100644
--- a/release/scripts/startup/bl_ui/space_filebrowser.py
+++ b/release/scripts/startup/bl_ui/space_filebrowser.py
@@ -368,7 +368,9 @@ class FILEBROWSER_PT_directory_path(Panel):
         subrow.operator("file.parent", text="", icon='FILE_PARENT')
         subrow.operator("file.refresh", text="", icon='FILE_REFRESH')
 
-        row.operator("file.directory_new", icon='NEWFOLDER', text="")
+        subrow = row.row()
+        subrow.operator_context = 'EXEC_DEFAULT'
+        subrow.operator("file.directory_new", icon='NEWFOLDER', text="")
 
         subrow = row.row()
         subrow.template_file_select_path(params)
@@ -464,7 +466,9 @@ class FILEBROWSER_MT_context_menu(Menu):
 
         layout.operator("file.rename", text="Rename")
         # layout.operator("file.delete")
-        layout.operator("file.directory_new", text="New Folder")
+        sub = layout.row()
+        sub.operator_context = 'EXEC_DEFAULT'
+        sub.operator("file.directory_new", text="New Folder")
         layout.operator("file.bookmark_add", text="Add Bookmark")
 
         layout.separator()



More information about the Bf-blender-cvs mailing list