diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-03-11 13:52:36 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-03-11 16:34:13 +0300 |
commit | b5349d967f1af433a9ee914aec72e028c3b2cd10 (patch) | |
tree | f08e86e99f0e21f6aa333c7d01447e0e511a21b4 /source/blender | |
parent | 57777b95428cef886bd3b2317b7728fa066acee1 (diff) |
Fix T60855: workspace duplicate does not preserve addons filters.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/editors/screen/workspace_edit.c | 3 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_workspace_types.h | 4 |
2 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/editors/screen/workspace_edit.c b/source/blender/editors/screen/workspace_edit.c index c777308e435..d68fdbca956 100644 --- a/source/blender/editors/screen/workspace_edit.c +++ b/source/blender/editors/screen/workspace_edit.c @@ -203,6 +203,9 @@ WorkSpace *ED_workspace_duplicate( ListBase *layouts_old = BKE_workspace_layouts_get(workspace_old); WorkSpace *workspace_new = ED_workspace_add(bmain, workspace_old->id.name + 2); + workspace_new->flags = workspace_old->flags; + BLI_duplicatelist(&workspace_new->owner_ids, &workspace_old->owner_ids); + /* TODO(campbell): tools */ for (WorkSpaceLayout *layout_old = layouts_old->first; layout_old; layout_old = layout_old->next) { diff --git a/source/blender/makesdna/DNA_workspace_types.h b/source/blender/makesdna/DNA_workspace_types.h index daf6bb01ee9..3212ddb335e 100644 --- a/source/blender/makesdna/DNA_workspace_types.h +++ b/source/blender/makesdna/DNA_workspace_types.h @@ -133,7 +133,7 @@ typedef struct WorkSpace { /* Feature tagging (use for addons) */ /** #wmOwnerID. */ - ListBase owner_ids DNA_PRIVATE_WORKSPACE_READ_WRITE; + ListBase owner_ids; /* should be: '#ifdef USE_WORKSPACE_TOOL'. */ @@ -151,7 +151,7 @@ typedef struct WorkSpace { int object_mode; /** Enum eWorkSpaceFlags. */ - int flags DNA_PRIVATE_WORKSPACE; + int flags; /* Number for workspace tab reordering in the UI. */ int order; |