Fix T51318: Non-update of preview when switching from world to lamp panel.

Lamp preview panel is in DATA buttons context...
This commit is contained in:
Bastien Montagne 2017-05-22 17:11:55 +02:00
parent f08f8a2df2
commit 849e77b1f9
Notes: blender-bot 2023-02-14 11:28:43 +01:00
Referenced by issue #51318, Non-update of preview when switching from world to lamp panel.
1 changed files with 2 additions and 1 deletions

View File

@ -1130,7 +1130,8 @@ static EnumPropertyItem *rna_SpaceProperties_context_itemf(bContext *UNUSED(C),
static void rna_SpaceProperties_context_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
{
SpaceButs *sbuts = (SpaceButs *)(ptr->data);
if (ELEM(sbuts->mainb, BCONTEXT_WORLD, BCONTEXT_MATERIAL, BCONTEXT_TEXTURE)) {
/* XXX BCONTEXT_DATA is ugly, but required for lamps... See T51318. */
if (ELEM(sbuts->mainb, BCONTEXT_WORLD, BCONTEXT_MATERIAL, BCONTEXT_TEXTURE, BCONTEXT_DATA)) {
sbuts->preview = 1;
}
}