Workspace: Clarifying library remap workaround

WorkSpaceLayout->screen will be made public soon, but meanwhile this makes it
clear why we are not passing layout->screen to CALLBACK_INVOKE in this case.
This commit is contained in:
Dalai Felinto 2017-12-08 13:27:22 -02:00
parent 392c23bdb9
commit 9454359a16
1 changed files with 2 additions and 0 deletions

View File

@ -984,6 +984,8 @@ void BKE_library_foreach_ID_link(Main *bmain, ID *id, LibraryIDLinkCallback call
for (WorkSpaceLayout *layout = layouts->first; layout; layout = layout->next) {
bScreen *screen = BKE_workspace_layout_screen_get(layout);
/* CALLBACK_INVOKE expects an actual pointer, not a variable holding the pointer.
* However we can't acess layout->screen here since we are outside the workspace project. */
CALLBACK_INVOKE(screen, IDWALK_CB_NOP);
/* allow callback to set a different screen */
BKE_workspace_layout_screen_set(layout, screen);