diff options
author | Bastien Montagne <bastien@blender.org> | 2020-09-29 13:14:04 +0300 |
---|---|---|
committer | Bastien Montagne <bastien@blender.org> | 2020-09-29 18:08:44 +0300 |
commit | 84b3f6e049b35f9fce799e23acfde79511480206 (patch) | |
tree | 5601e8d838efec321679efe5918294ef96d702b7 /source/blender/blenkernel/intern/workspace.c | |
parent | ece8f69f856dc27b5ac1b10796ca9609457df5ec (diff) |
Fix (unrepported) utterly broken logic in readfile for Workspaces.
Remove the attempt to update the active layout pointers of each window
from whithin `direct_link_workspace`.
This piece of code was a nonsense for at least to critical reasons:
* Do not, never, ever, access data from another datablock within the
direct_link_... functions. Just don't. Don't try to be smart.
* Since it was trying (and failing) to update the active layout of every
window for every workspace, it was effectively setting those
`act_layout` pointers to NULL (remapping can only ever happen once,
trying to remap and already remapped new pointer is bound to fail in
any case).
Luckily (and funnily), this piece of code was actually harmless, since
setting the active layout would be overridden/redone later, in
`lib_link_windowmanager`, when updating their `workspace_hook` in
`lib_link_workspace_instance_hook`.
Note that the similar horror with `WorkSpaceDataRelation->parent` (which
points at a window) is kept for now, because that one is needed. Hope to
refactor it soon though.
Diffstat (limited to 'source/blender/blenkernel/intern/workspace.c')
0 files changed, 0 insertions, 0 deletions