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-06-15 16:06:54 +0300
committerHans Goudey <h.goudey@me.com>2020-06-15 16:06:54 +0300
commitec25084f5a404cbca4ceffd659d46b21c758522a (patch)
treea0cda3acd0f21127b6f0e1ce0648e2f5a27775b8 /source/blender/makesrna/intern/rna_ui.c
parenteadbdf170aeccba498fd9c0e7ef879f2a9f71bd0 (diff)
Fix T77541: Unregistering DATA_PT_modifiers doesn't remove modifier panels
This is a pretty quick fix; the solution is just removing all the instanced panels whena panel is unregistered. This also necessitates adding the option to call UI_panels_free_instanced with NULL context. Differential Revision: https://developer.blender.org/D7977
Diffstat (limited to 'source/blender/makesrna/intern/rna_ui.c')
-rw-r--r--source/blender/makesrna/intern/rna_ui.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_ui.c b/source/blender/makesrna/intern/rna_ui.c
index 9c9d10afa63..5228f00d0de 100644
--- a/source/blender/makesrna/intern/rna_ui.c
+++ b/source/blender/makesrna/intern/rna_ui.c
@@ -227,6 +227,9 @@ static void rna_Panel_unregister(Main *bmain, StructRNA *type)
}
}
}
+ /* The unregistered panel might have had a template that added instanced panels,
+ * so remove them just in case. They can be re-added on redraw anyway. */
+ UI_panels_free_instanced(NULL, region);
}
}
}