Asset Browser: Redraw sidebars on mode switches
There may be mode specific panels for some assets in the navigation or the asset metadata sidebar. For example the pose library will likely do this. So let the regions redraw on mode changes.
This commit is contained in:
parent
15471d9bed
commit
13a4bccdb1
Notes:
blender-bot
2023-02-13 17:37:48 +01:00
Referenced by issue #91894, Baking normal maps for transformed objects is broken (3.0) Referenced by issue #91729, Cycles Illegal address on CUDA/OptiX GPU when overclocking GPU Core Clock Referenced by issue #91614, Blender 3.00 Alpha after Cycles X merge: AO node no longer affects volumes
|
@ -738,8 +738,18 @@ static void file_tools_region_draw(const bContext *C, ARegion *region)
|
|||
ED_region_panels(C, region);
|
||||
}
|
||||
|
||||
static void file_tools_region_listener(const wmRegionListenerParams *UNUSED(listener_params))
|
||||
static void file_tools_region_listener(const wmRegionListenerParams *listener_params)
|
||||
{
|
||||
const wmNotifier *wmn = listener_params->notifier;
|
||||
ARegion *region = listener_params->region;
|
||||
|
||||
switch (wmn->category) {
|
||||
case NC_SCENE:
|
||||
if (ELEM(wmn->data, ND_MODE)) {
|
||||
ED_region_tag_redraw(region);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void file_tool_props_region_listener(const wmRegionListenerParams *listener_params)
|
||||
|
@ -754,6 +764,11 @@ static void file_tool_props_region_listener(const wmRegionListenerParams *listen
|
|||
ED_region_tag_redraw(region);
|
||||
}
|
||||
break;
|
||||
case NC_SCENE:
|
||||
if (ELEM(wmn->data, ND_MODE)) {
|
||||
ED_region_tag_redraw(region);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue