From b1bdfb6e32b9371048677196ac256290cfd35d0b Mon Sep 17 00:00:00 2001 From: David Friedli Date: Sun, 27 Sep 2020 23:24:29 -0500 Subject: Fix T79275: Missing redraw for pinned active tool settings panels In the 3D view sidebar, the active tool settings panel can be pinned to other categories, and in those other categories it doesn't redraw when the active tool changes. This commit checks for pinned panels from the "Tool" category when checking whether to redraw. Note that the relatively expensive string comparison is only done for currently visible pinned panels. Differential Revision: https://developer.blender.org/D9012 --- source/blender/editors/interface/interface_panel.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to '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 b9ed1688e80..65415a750bb 100644 --- a/source/blender/editors/interface/interface_panel.c +++ b/source/blender/editors/interface/interface_panel.c @@ -877,6 +877,11 @@ void UI_panels_set_expansion_from_seach_filter(const bContext *C, ARegion *regio } } +bool UI_panel_is_active(const Panel *panel) +{ + return panel->runtime_flag & PANEL_ACTIVE; +} + /** \} */ /* -------------------------------------------------------------------- */ -- cgit v1.2.3