diff options
author | Julian Eisel <eiseljulian@gmail.com> | 2018-04-22 20:58:27 +0300 |
---|---|---|
committer | Julian Eisel <eiseljulian@gmail.com> | 2018-04-23 00:23:20 +0300 |
commit | 9db492de6dd07dca93f0de7dbfa92f811fe50765 (patch) | |
tree | f7050e660a9d6deedfe6873875d042c90fa5cea2 /source/blender/editors/screen/screen_edit.c | |
parent | 9eaf00616ba60df92cfab2837dd175b8e7eb4c44 (diff) |
Cleanup: Get rid of ScrArea.butspacetype syncing with ScrArea.spacetype
The only real reason we need `butspacetype` is while switching areas, where we
need to delay the actual switch to the RNA _update callback since only there we
can access context.
So instead of trying to sync it with `spacetype`, only set while needed and
unset it afterwards (as in set to `SPACE_EMPTY`).
This should also allow us to re-use `butspacetype` in versioning code when
trying to read removed editors. It'll store the space type value of the removed
editor which we can then use on versioning.
For backwards compatibility, we store `butspacetype` with the value of
`spacetype`.
Diffstat (limited to 'source/blender/editors/screen/screen_edit.c')
-rw-r--r-- | source/blender/editors/screen/screen_edit.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/editors/screen/screen_edit.c b/source/blender/editors/screen/screen_edit.c index dba44909189..8db92855de6 100644 --- a/source/blender/editors/screen/screen_edit.c +++ b/source/blender/editors/screen/screen_edit.c @@ -179,7 +179,7 @@ static ScrArea *screen_addarea_ex( sa->v3 = top_right; sa->v4 = bottom_right; sa->headertype = headertype; - sa->spacetype = sa->butspacetype = spacetype; + sa->spacetype = spacetype; BLI_addtail(&area_map->areabase, sa); |