WM: ensure operator context isn't used for drop operator properties

Since wmDropBox are setup with the editors and aren't re-initialized
when the file is reloaded for e.g. it doesn't make sense to use the
current context when setting up their properties.

Note that this doesn't fix any user visible bugs and is more a issue of
correctness.
This commit is contained in:
Campbell Barton
2024-01-08 14:02:32 +11:00
parent 8fadc1ca7f
commit 7fa88241a8

View File

@@ -123,6 +123,10 @@ wmDropBox *WM_dropbox_add(ListBase *lb,
drop->ot = ot;
WM_operator_properties_alloc(&(drop->ptr), &(drop->properties), idname);
WM_operator_properties_sanitize(drop->ptr, true);
/* Signal for no context, see #STRUCT_NO_CONTEXT_WITHOUT_OWNER_ID. */
drop->ptr->owner_id = nullptr;
BLI_addtail(lb, drop);