Fix #124163: Update SO_DATA_API Outliner When Windows are Removed

On Window close send NC_WINDOW | NA_REMOVED notification. If Outliner
is in SO_DATA_API mode with this message then refresh.

Pull Request: https://projects.blender.org/blender/blender/pulls/124205
This commit is contained in:
Harley Acheson 2024-07-05 19:33:27 +02:00 committed by Harley Acheson
parent 4b168dd645
commit fd06a407e1
2 changed files with 12 additions and 0 deletions

@ -103,6 +103,16 @@ static void outliner_main_region_listener(const wmRegionListenerParams *params)
/* context changes */
switch (wmn->category) {
case NC_WINDOW:
switch (wmn->action) {
case NA_ADDED:
case NA_REMOVED:
if (space_outliner->outlinevis == SO_DATA_API) {
ED_region_tag_redraw(region);
}
break;
}
break;
case NC_WM:
switch (wmn->data) {
case ND_LIB_OVERRIDE_CHANGED:

@ -477,6 +477,8 @@ void wm_window_close(bContext *C, wmWindowManager *wm, wmWindow *win)
BKE_workspace_layout_remove(bmain, workspace, layout);
WM_event_add_notifier(C, NC_SCREEN | ND_LAYOUTDELETE, nullptr);
}
WM_main_add_notifier(NC_WINDOW | NA_REMOVED, nullptr);
}
void wm_window_title(wmWindowManager *wm, wmWindow *win)