diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-05-07 05:27:10 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-05-07 05:27:10 +0300 |
commit | b1374a8ce99bcc307e47bc9a96032a464bbf385f (patch) | |
tree | 8069bf96fbe80ce531670ff014f6c7aad249a747 /release/scripts/startup/bl_ui/space_filebrowser.py | |
parent | 1dced6d814dd872620a005dc1a48b47e8a92a6e1 (diff) |
Fix menu search expanding file browser menus
Diffstat (limited to 'release/scripts/startup/bl_ui/space_filebrowser.py')
-rw-r--r-- | release/scripts/startup/bl_ui/space_filebrowser.py | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/release/scripts/startup/bl_ui/space_filebrowser.py b/release/scripts/startup/bl_ui/space_filebrowser.py index 53fc812a619..9a39d840149 100644 --- a/release/scripts/startup/bl_ui/space_filebrowser.py +++ b/release/scripts/startup/bl_ui/space_filebrowser.py @@ -20,6 +20,7 @@ from bpy.types import Header, Panel, Menu, UIList + class FILEBROWSER_HT_header(Header): bl_space_type = 'FILE_BROWSER' @@ -31,8 +32,7 @@ class FILEBROWSER_HT_header(Header): if st.active_operator is None: layout.template_header() - layout.menu("FILEBROWSER_MT_view") - layout.menu("FILEBROWSER_MT_select") + FILEBROWSER_MT_editor_menus.draw_collapsible(context, layout) # can be None when save/reload with a file selector open @@ -411,6 +411,17 @@ class FILEBROWSER_PT_directory_path(Panel): ).region_type = 'TOOL_PROPS' +class FILEBROWSER_MT_editor_menus(Menu): + bl_idname = "FILEBROWSER_MT_editor_menus" + bl_label = "" + + def draw(self, _context): + layout = self.layout + + layout.menu("FILEBROWSER_MT_view") + layout.menu("FILEBROWSER_MT_select") + + class FILEBROWSER_MT_view(Menu): bl_label = "View" @@ -502,6 +513,7 @@ classes = ( FILEBROWSER_PT_bookmarks_recents, FILEBROWSER_PT_advanced_filter, FILEBROWSER_PT_directory_path, + FILEBROWSER_MT_editor_menus, FILEBROWSER_MT_view, FILEBROWSER_MT_select, FILEBROWSER_MT_context_menu, |