From f834cb03565c41172e8c8d39b6978b92a85e686c Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Tue, 6 Oct 2015 20:17:40 +0200 Subject: [PATCH] =?UTF-8?q?Fix=20FileBrowser:=20do=20not=20show=20'advance?= =?UTF-8?q?d=20filter'=20panel=20outside=20of=20lib=20browsing=20context,?= =?UTF-8?q?=20it=E2=80=99s=20only=20used=20there=20so=20far.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reported by Thomas Beck (plasmasolutions) over IRC, thanks. Safe enough for 2.76. --- release/scripts/startup/bl_ui/space_filebrowser.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/release/scripts/startup/bl_ui/space_filebrowser.py b/release/scripts/startup/bl_ui/space_filebrowser.py index ca695208a67..f6f86c0c7a7 100644 --- a/release/scripts/startup/bl_ui/space_filebrowser.py +++ b/release/scripts/startup/bl_ui/space_filebrowser.py @@ -229,6 +229,11 @@ class FILEBROWSER_PT_advanced_filter(Panel): bl_category = "Filter" bl_label = "Advanced Filter" + @classmethod + def poll(cls, context): + # only useful in append/link (library) context currently... + return context.space_data.params.use_library_browsing + def draw(self, context): layout = self.layout space = context.space_data