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:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user