Property Search: Fix missing update switching tabs after search

What I thought was an "optimization" was really a bug. The "use search
for expansion" value needs to be set for every panel, even panels in
other tabs. Otherwise it won't be properly set when switching back to
a tab that was visited during search.

Differential Revision: https://developer.blender.org/D9427
This commit is contained in:
Hans Goudey 2020-11-03 16:24:22 -06:00
parent 8f2ebcf93f
commit 5650468c84
Notes: blender-bot 2023-02-14 03:52:45 +01:00
Referenced by issue #82344, Property Search: Missing update switching tabs after search
1 changed files with 1 additions and 5 deletions

View File

@ -938,11 +938,7 @@ static void region_panels_set_expansion_from_seach_filter(const bContext *C,
const bool use_animation)
{
LISTBASE_FOREACH (Panel *, panel, &region->panels) {
/* Checking if the panel is active is only an optimization, it would be fine to run this on
* inactive panels. */
if (panel->runtime_flag & PANEL_ACTIVE) {
panel_set_expansion_from_seach_filter_recursive(C, panel, use_search_closed, use_animation);
}
panel_set_expansion_from_seach_filter_recursive(C, panel, use_search_closed, use_animation);
}
set_panels_list_data_expand_flag(C, region);
}