From 8c6337e587bd2d738398474ce6068a748bd1b85b Mon Sep 17 00:00:00 2001 From: Julian Eisel Date: Thu, 11 Mar 2021 18:40:42 +0100 Subject: Fix missing UI updates, caused by own earlier commit Caused by 46aa70cb486d. RNA would send property update notifiers with the owner ID as `reference` data. Since above's commit we'd only send the notifiers to editors if the reference data address matches the space's address. So editors wouldn't get the notifiers at all. The owner ID for space properties is always the screen AFAIK. So allow notifiers with the screen as reference to be passed to editors as well, think this is reasonable to do either way. For example, steps to reproduce were: * Open Asset Browser * Mark some data-blocks of different types as assets (e.g. object & its material) * Switch between the categories in the Asset Browser. The asset list wouldn't be updated. --- source/blender/windowmanager/intern/wm_event_system.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'source/blender/windowmanager/intern/wm_event_system.c') diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c index 33ba27c849c..646aa71025c 100644 --- a/source/blender/windowmanager/intern/wm_event_system.c +++ b/source/blender/windowmanager/intern/wm_event_system.c @@ -577,9 +577,12 @@ void wm_event_do_notifiers(bContext *C) } ED_screen_areas_iter (win, screen, area) { - if ((note->category == NC_SPACE) && note->reference && - (note->reference != area->spacedata.first)) { - continue; + if ((note->category == NC_SPACE) && note->reference) { + /* Filter out notifiers sent to other spaces. RNA sets the reference to the owning ID + * though, the screen, so let notifiers through that reference the entire screen. */ + if ((note->reference != area->spacedata.first) && (note->reference != screen)) { + continue; + } } wmSpaceTypeListenerParams area_params = { .window = win, -- cgit v1.2.3