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:
authorHans Goudey <h.goudey@me.com>2020-08-06 00:38:48 +0300
committerHans Goudey <h.goudey@me.com>2020-08-06 00:38:48 +0300
commit8c98684e2209ca6da35888d37549832694feea9e (patch)
tree9759aefa2a2c661d1f694c1dcc2b19aad8201b6b /source/blender/editors
parent3570173d0f5cb5b0335fa346a0548d97985caf14 (diff)
parentc5b6b3d82f56b6da1fce19b961fa444745dbc269 (diff)
Merge branch 'blender-v2.90-release'
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/interface/interface_panel.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/editors/interface/interface_panel.c b/source/blender/editors/interface/interface_panel.c
index dd3074d6258..799a3b7fd5e 100644
--- a/source/blender/editors/interface/interface_panel.c
+++ b/source/blender/editors/interface/interface_panel.c
@@ -321,7 +321,7 @@ void UI_list_panel_unique_str(Panel *panel, char *r_name)
* Remove the #uiBlock corresponding to a panel. The lookup is needed because panels don't store
* a reference to their corresponding #uiBlock.
*/
-static void panel_free_block(ARegion *region, Panel *panel)
+static void panel_free_block(const bContext *C, ARegion *region, Panel *panel)
{
BLI_assert(panel->type);
@@ -334,7 +334,7 @@ static void panel_free_block(ARegion *region, Panel *panel)
LISTBASE_FOREACH (uiBlock *, block, &region->uiblocks) {
if (STREQ(block->name, block_name)) {
BLI_remlink(&region->uiblocks, block);
- UI_block_free(NULL, block);
+ UI_block_free(C, block);
break; /* Only delete one block for this panel. */
}
}
@@ -347,15 +347,15 @@ static void panel_free_block(ARegion *region, Panel *panel)
* \note The only panels that should need to be deleted at runtime are panels with the
* #PNL_INSTANCED flag set.
*/
-static void panel_delete(ARegion *region, ListBase *panels, Panel *panel)
+static void panel_delete(const bContext *C, ARegion *region, ListBase *panels, Panel *panel)
{
/* Recursively delete children. */
LISTBASE_FOREACH_MUTABLE (Panel *, child, &panel->children) {
- panel_delete(region, &panel->children, child);
+ panel_delete(C, region, &panel->children, child);
}
BLI_freelistN(&panel->children);
- panel_free_block(region, panel);
+ panel_free_block(C, region, panel);
BLI_remlink(panels, panel);
if (panel->activedata) {
@@ -386,7 +386,7 @@ void UI_panels_free_instanced(bContext *C, ARegion *region)
}
/* Free the panel and its sub-panels. */
- panel_delete(region, &region->panels, panel);
+ panel_delete(C, region, &region->panels, panel);
}
}
}