mirror of
https://github.com/blender/blender
synced 2026-09-29 04:37:17 +03:00
UI: Move "Reset Recent" inside a menu
Move the File Browser's `Reset Recent` button into a menu to prevent accidental clicks of a destructive operation. Also rename it to a more descriptive `Clear Recent Items`, and since the word "Reset" is used for resetting values to default. Pull Request: https://projects.blender.org/blender/blender/pulls/112853
This commit is contained in:
parent
f2fb74d30c
commit
90d8a07213
1 changed files with 11 additions and 1 deletions
|
|
@ -327,6 +327,15 @@ class FILEBROWSER_PT_bookmarks_favorites(FileBrowserPanel, Panel):
|
|||
layout.operator("file.bookmark_add", icon='ADD')
|
||||
|
||||
|
||||
class FILEBROWSER_MT_bookmarks_recents_specials_menu(Menu):
|
||||
bl_label = "Recent Items Specials"
|
||||
|
||||
def draw(self, _context):
|
||||
layout = self.layout
|
||||
|
||||
layout.operator("file.reset_recent", icon='X', text="Clear Recent Items")
|
||||
|
||||
|
||||
class FILEBROWSER_PT_bookmarks_recents(Panel):
|
||||
bl_space_type = 'FILE_BROWSER'
|
||||
bl_region_type = 'TOOLS'
|
||||
|
|
@ -351,7 +360,7 @@ class FILEBROWSER_PT_bookmarks_recents(Panel):
|
|||
space, "recent_folders_active", item_dyntip_propname="path", rows=1, maxrows=10)
|
||||
|
||||
col = row.column(align=True)
|
||||
col.operator("file.reset_recent", icon='X', text="")
|
||||
col.menu("FILEBROWSER_MT_bookmarks_recents_specials_menu", icon='DOWNARROW_HLT', text="")
|
||||
|
||||
|
||||
class FILEBROWSER_PT_advanced_filter(Panel):
|
||||
|
|
@ -853,6 +862,7 @@ classes = (
|
|||
FILEBROWSER_PT_bookmarks_favorites,
|
||||
FILEBROWSER_PT_bookmarks_system,
|
||||
FILEBROWSER_PT_bookmarks_volumes,
|
||||
FILEBROWSER_MT_bookmarks_recents_specials_menu,
|
||||
FILEBROWSER_PT_bookmarks_recents,
|
||||
FILEBROWSER_PT_advanced_filter,
|
||||
FILEBROWSER_PT_directory_path,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue