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:
Diffstat (limited to 'source/blender/editors/interface/interface_panel.c')
-rw-r--r--source/blender/editors/interface/interface_panel.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/editors/interface/interface_panel.c b/source/blender/editors/interface/interface_panel.c
index 3cc9a743a17..a22351eea7e 100644
--- a/source/blender/editors/interface/interface_panel.c
+++ b/source/blender/editors/interface/interface_panel.c
@@ -2100,7 +2100,7 @@ static void ui_handle_panel_header(const bContext *C,
BLI_assert(!(panel->type->flag & PANEL_TYPE_NO_HEADER));
const bool is_subpanel = (panel->type->parent != NULL);
- const bool use_pin = UI_panel_category_is_visible(region) && !is_subpanel;
+ const bool use_pin = UI_panel_category_is_visible(region) && UI_panel_can_be_pinned(panel);
const bool show_pin = use_pin && (panel->flag & PNL_PIN);
const bool show_drag = !is_subpanel;
@@ -2497,6 +2497,11 @@ PointerRNA *UI_region_panel_custom_data_under_cursor(const bContext *C, const wm
return NULL;
}
+bool UI_panel_can_be_pinned(const Panel *panel)
+{
+ return (panel->type->parent == NULL) && !(panel->type->flag & PANEL_TYPE_INSTANCED);
+}
+
/** \} */
/* -------------------------------------------------------------------- */