Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Goudey <h.goudey@me.com>2020-09-19 00:39:43 +0300
committerHans Goudey <h.goudey@me.com>2020-09-19 00:39:43 +0300
commita0a536bbffaa866a504f5faa42d8605bf557729a (patch)
tree6be7ef59389417be7371fa05dd94db8eaa58a885 /source/blender/editors/interface/interface_panel.c
parentea72c5d69be6fe25f7ed759f024dcbcd5db726cf (diff)
Property Search: Don't set expansion for panels in inactive tabs
The search should check if a panel is active before changing its expansion, otherwise it sets the expansion for all of the region's panels, even invisible ones in other tabs.
Diffstat (limited to 'source/blender/editors/interface/interface_panel.c')
-rw-r--r--source/blender/editors/interface/interface_panel.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/source/blender/editors/interface/interface_panel.c b/source/blender/editors/interface/interface_panel.c
index f57be8e5688..5800479874c 100644
--- a/source/blender/editors/interface/interface_panel.c
+++ b/source/blender/editors/interface/interface_panel.c
@@ -854,10 +854,11 @@ static void panel_set_expansion_from_seach_filter_recursive(const bContext *C, P
/* If the panel is filtered (removed) we need to check that its children are too. */
LISTBASE_FOREACH (Panel *, child_panel, &panel->children) {
- if (panel->type == NULL || (panel->type->flag & PNL_NO_HEADER)) {
- continue;
+ if (panel->runtime_flag & PANEL_ACTIVE) {
+ if (!(panel->type->flag & PNL_NO_HEADER)) {
+ panel_set_expansion_from_seach_filter_recursive(C, child_panel);
+ }
}
- panel_set_expansion_from_seach_filter_recursive(C, child_panel);
}
}
@@ -868,10 +869,11 @@ static void panel_set_expansion_from_seach_filter_recursive(const bContext *C, P
void UI_panels_set_expansion_from_seach_filter(const bContext *C, ARegion *region)
{
LISTBASE_FOREACH (Panel *, panel, &region->panels) {
- if (panel->type == NULL || (panel->type->flag & PNL_NO_HEADER)) {
- continue;
+ if (panel->runtime_flag & PANEL_ACTIVE) {
+ if (!(panel->type->flag & PNL_NO_HEADER)) {
+ panel_set_expansion_from_seach_filter_recursive(C, panel);
+ }
}
- panel_set_expansion_from_seach_filter_recursive(C, panel);
}
}