diff options
author | Hans Goudey <h.goudey@me.com> | 2020-06-09 20:41:50 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2020-06-09 20:41:50 +0300 |
commit | 819ebc990144c516e1ae393b6e6ecdf98a184811 (patch) | |
tree | f6db64abcc19e0d55e03b79ee478901a8e9b49b3 /source/blender/editors/interface | |
parent | cb9de95d61b32f90788875f20e046095bb6310ad (diff) |
UI: Set modifier panel expansion on every redraw
This will fix situations where the modifier epansion was set elsewhere
besides the UI, like from the python console, solving the drawing part
of T77502.
Also adds update tags to the show_expanded property, which means
the properties window redraws when the property changes.
Diffstat (limited to 'source/blender/editors/interface')
-rw-r--r-- | source/blender/editors/interface/interface_templates.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c index 1d55e2b3e4b..6295f51f01e 100644 --- a/source/blender/editors/interface/interface_templates.c +++ b/source/blender/editors/interface/interface_templates.c @@ -1860,6 +1860,13 @@ void uiTemplateModifiers(uiLayout *UNUSED(layout), bContext *C) } } } + else { + /* The expansion might have been changed elsewhere, so we still need to set it. */ + LISTBASE_FOREACH (Panel *, panel, ®ion->panels) { + if ((panel->type != NULL) && (panel->type->flag & PNL_INSTANCED)) + UI_panel_set_expand_from_list_data(C, panel); + } + } } /** \} */ |