[Bf-blender-cvs] [bfa5eceb89c] master: UI: Only set panel data expand flag for active panels
Hans Goudey
noreply at git.blender.org
Wed Jun 10 20:56:59 CEST 2020
Commit: bfa5eceb89cfc1d9f120c35e2206464c31630111
Author: Hans Goudey
Date: Wed Jun 10 14:56:52 2020 -0400
Branches: master
https://developer.blender.org/rBbfa5eceb89cfc1d9f120c35e2206464c31630111
UI: Only set panel data expand flag for active panels
This solves a crash when switching from the modifiers tab to an armature
object and expanding a panel. Thanks to Alexander Gavrilov for mentioning
the problem.
===================================================================
M source/blender/editors/interface/interface_panel.c
===================================================================
diff --git a/source/blender/editors/interface/interface_panel.c b/source/blender/editors/interface/interface_panel.c
index a83f1cc44db..5f56a93c5eb 100644
--- a/source/blender/editors/interface/interface_panel.c
+++ b/source/blender/editors/interface/interface_panel.c
@@ -563,7 +563,8 @@ static void set_panels_list_data_expand_flag(const bContext *C, ARegion *region)
continue;
}
- if (panel->type->flag & PNL_INSTANCED) {
+ /* Check for #PNL_ACTIVE so we only set the expand flag for active panels. */
+ if (panel_type->flag & PNL_INSTANCED && panel->runtime_flag & PNL_ACTIVE) {
short expand_flag = 0; /* Initialize to quite complaining compiler, value not used. */
short flag_index = 0;
get_panel_expand_flag(panel, &expand_flag, &flag_index);
More information about the Bf-blender-cvs
mailing list