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:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user