[Bf-blender-cvs] [332846b188d] master: Remove editor type selector from File Browser when in 'Operator' mode.

Bastien Montagne noreply at git.blender.org
Fri Apr 13 12:16:09 CEST 2018


Commit: 332846b188d6c7463758fb8d8659785beccde63a
Author: Bastien Montagne
Date:   Fri Apr 13 12:11:56 2018 +0200
Branches: master
https://developer.blender.org/rB332846b188d6c7463758fb8d8659785beccde63a

Remove editor type selector from File Browser when in 'Operator' mode.

Having that one when opening a file or loading some lib makes absolutely
no sense, and switching that 'temp' editor to some other type can
trigger all kind of funny bugs...

Note that using the shortcuts keys (Shift-F5 etc.) is still possible,
removing those seems a bit more involved. :/

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

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 bd72dfa9370..2d45d11b423 100644
--- a/release/scripts/startup/bl_ui/space_filebrowser.py
+++ b/release/scripts/startup/bl_ui/space_filebrowser.py
@@ -28,8 +28,10 @@ class FILEBROWSER_HT_header(Header):
         layout = self.layout
 
         st = context.space_data
+        params = st.params
 
-        layout.template_header()
+        if st.active_operator is None:
+            layout.template_header()
 
         row = layout.row()
         row.separator()
@@ -46,7 +48,6 @@ class FILEBROWSER_HT_header(Header):
         layout.separator()
 
         layout.operator_context = 'INVOKE_DEFAULT'
-        params = st.params
 
         # can be None when save/reload with a file selector open
         if params:



More information about the Bf-blender-cvs mailing list