From cc0b8cb3599f50012bd90a0c41462290007f3328 Mon Sep 17 00:00:00 2001 From: Hans Goudey Date: Tue, 17 Nov 2020 10:07:38 -0500 Subject: Fix T82341: Warning in terminal during property search After recent changes to the context panel layout (rB187cc5e26d28b1a8), there has been an error printed when running propery search: > Error: separator_spacer() not supported in popups. The layout code thinks it's drawing in a menu because region->visible isn't properly set for the other tab searches. This patch sets that field for the temporary searching region, but it also disables searching in the context breadcrumbs panel, because at best this will just give results for the names of the active object, etc. This isn't helpful since those labels are mostly in every tab anyway. Differential Revision: https://developer.blender.org/D9425 --- source/blender/editors/screen/area.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source/blender/editors/screen/area.c') diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c index f5962f36412..a5858d3d65c 100644 --- a/source/blender/editors/screen/area.c +++ b/source/blender/editors/screen/area.c @@ -3080,6 +3080,11 @@ static bool panel_property_search(const bContext *C, uiBlock *block = UI_block_begin(C, region, panel_type->idname, UI_EMBOSS); UI_block_set_search_only(block, true); + /* Skip panels that give meaningless search results. */ + if (panel_type->flag & PNL_NO_SEARCH) { + return false; + } + if (panel == NULL) { bool open; /* Dummy variable. */ panel = UI_panel_begin(region, ®ion->panels, block, panel_type, panel, &open); -- cgit v1.2.3