Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/interface/interface_panel.c
| Show First 20 Lines • Show All 2,094 Lines • ▼ Show 20 Lines | |||||
| { | { | ||||
| Panel *panel = block->panel; | Panel *panel = block->panel; | ||||
| ARegion *region = CTX_wm_region(C); | ARegion *region = CTX_wm_region(C); | ||||
| BLI_assert(panel->type != NULL); | BLI_assert(panel->type != NULL); | ||||
| BLI_assert(!(panel->type->flag & PANEL_TYPE_NO_HEADER)); | BLI_assert(!(panel->type->flag & PANEL_TYPE_NO_HEADER)); | ||||
| const bool is_subpanel = (panel->type->parent != NULL); | const bool is_subpanel = (panel->type->parent != NULL); | ||||
| const bool use_pin = UI_panel_category_is_visible(region) && !is_subpanel; | const bool is_instanced = (panel->type->flag & PANEL_TYPE_INSTANCED); | ||||
| const bool use_pin = UI_panel_category_is_visible(region) && !is_subpanel && !is_instanced; | |||||
| const bool show_pin = use_pin && (panel->flag & PNL_PIN); | const bool show_pin = use_pin && (panel->flag & PNL_PIN); | ||||
| const bool show_drag = !is_subpanel; | const bool show_drag = !is_subpanel; | ||||
| /* Handle panel pinning. */ | /* Handle panel pinning. */ | ||||
| if (use_pin && ELEM(event_type, EVT_RETKEY, EVT_PADENTER, LEFTMOUSE) && shift) { | if (use_pin && ELEM(event_type, EVT_RETKEY, EVT_PADENTER, LEFTMOUSE) && shift) { | ||||
| panel->flag ^= PNL_PIN; | panel->flag ^= PNL_PIN; | ||||
| ED_region_tag_redraw(region); | ED_region_tag_redraw(region); | ||||
| return; | return; | ||||
| ▲ Show 20 Lines • Show All 512 Lines • Show Last 20 Lines | |||||