Fix #109995: Outliner listen to collection change in the header region

Changing the active collection redraws many regions, not the Outliner
header though (blender itself does not need a redraw there -- it does
not present anything related to active collection in the header). This
was requested from Addon devs in #109995 (placing active collection
related buttons there).

Pull Request: https://projects.blender.org/blender/blender/pulls/111725
This commit is contained in:
Philipp Oeser
2025-01-11 01:19:57 +01:00
committed by Harley Acheson
parent eb7df01ef3
commit 0c612cecef

View File

@@ -353,8 +353,16 @@ static void outliner_header_region_listener(const wmRegionListenerParams *params
/* context changes */
switch (wmn->category) {
case NC_SCENE:
if (wmn->data == ND_KEYINGSET) {
ED_region_tag_redraw(region);
switch (wmn->data) {
case ND_KEYINGSET:
ED_region_tag_redraw(region);
break;
case ND_LAYER:
/* Not needed by blender itself, but requested by Addon devs. #109995 */
if ((wmn->subtype == NS_LAYER_COLLECTION) && (wmn->action == NA_ACTIVATED)) {
ED_region_tag_redraw(region);
}
break;
}
break;
case NC_SPACE: