[Bf-blender-cvs] [7be1c8bbae7] master: Cleanup: de-duplicate notifier add function
Campbell Barton
noreply at git.blender.org
Thu Aug 18 07:55:56 CEST 2022
Commit: 7be1c8bbae76f49fed96a6b0ca0cf387e002d1a5
Author: Campbell Barton
Date: Thu Aug 18 14:45:49 2022 +1000
Branches: master
https://developer.blender.org/rB7be1c8bbae76f49fed96a6b0ca0cf387e002d1a5
Cleanup: de-duplicate notifier add function
===================================================================
M source/blender/windowmanager/intern/wm_event_system.cc
===================================================================
diff --git a/source/blender/windowmanager/intern/wm_event_system.cc b/source/blender/windowmanager/intern/wm_event_system.cc
index 4fb208b0788..bff1edc40b3 100644
--- a/source/blender/windowmanager/intern/wm_event_system.cc
+++ b/source/blender/windowmanager/intern/wm_event_system.cc
@@ -295,20 +295,7 @@ void WM_main_add_notifier(unsigned int type, void *reference)
Main *bmain = G_MAIN;
wmWindowManager *wm = static_cast<wmWindowManager *>(bmain->wm.first);
- if (!wm || wm_test_duplicate_notifier(wm, type, reference)) {
- return;
- }
-
- wmNotifier *note = MEM_cnew<wmNotifier>(__func__);
-
- BLI_addtail(&wm->notifier_queue, note);
-
- note->category = type & NOTE_CATEGORY;
- note->data = type & NOTE_DATA;
- note->subtype = type & NOTE_SUBTYPE;
- note->action = type & NOTE_ACTION;
-
- note->reference = reference;
+ WM_event_add_notifier_ex(wm, nullptr, type, reference);
}
void WM_main_remove_notifier_reference(const void *reference)
More information about the Bf-blender-cvs
mailing list