diff options
author | Julian Eisel <eiseljulian@gmail.com> | 2015-06-08 16:59:32 +0300 |
---|---|---|
committer | Julian Eisel <eiseljulian@gmail.com> | 2015-06-08 17:04:00 +0300 |
commit | 4f9494715719d563d7f45210e45aa3056535a09b (patch) | |
tree | 4c19fc6abcf46b17d493f87221623537c280fe07 /source/blender/editors/screen | |
parent | bcfe38aa037e2fcf1c41a3a85895c1482e21e0aa (diff) |
Fix T44976: 3D View turns into an Image Editor after saving render
result
Was a case of two stacked temporary fullscreens, so a quite extreme
situation.
Diffstat (limited to 'source/blender/editors/screen')
-rw-r--r-- | source/blender/editors/screen/screen_edit.c | 12 | ||||
-rw-r--r-- | source/blender/editors/screen/screen_ops.c | 2 |
2 files changed, 10 insertions, 4 deletions
diff --git a/source/blender/editors/screen/screen_edit.c b/source/blender/editors/screen/screen_edit.c index d9bd9cc4f51..0c40c833c0d 100644 --- a/source/blender/editors/screen/screen_edit.c +++ b/source/blender/editors/screen/screen_edit.c @@ -1763,12 +1763,18 @@ ScrArea *ED_screen_full_newspace(bContext *C, ScrArea *sa, int type) return newsa; } -void ED_screen_full_prevspace(bContext *C, ScrArea *sa) +/** + * \a was_prev_temp for the case previous space was a temporary fullscreen as well + */ +void ED_screen_full_prevspace(bContext *C, ScrArea *sa, const bool was_prev_temp) { if (sa->flag & AREA_FLAG_STACKED_FULLSCREEN) { /* stacked fullscreen -> only go back to previous screen and don't toggle out of fullscreen */ ED_area_prevspace(C, sa); - sa->flag &= ~AREA_FLAG_TEMP_TYPE; + /* only clear if previous space wasn't a temp fullscreen as well */ + if (!was_prev_temp) { + sa->flag &= ~AREA_FLAG_TEMP_TYPE; + } } else { ED_screen_restore_temp_type(C, sa); @@ -1803,7 +1809,7 @@ void ED_screen_full_restore(bContext *C, ScrArea *sa) if (sl->next) { if (sa->flag & AREA_FLAG_TEMP_TYPE) { - ED_screen_full_prevspace(C, sa); + ED_screen_full_prevspace(C, sa, false); } else { ED_screen_state_toggle(C, win, sa, state); diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c index 9745d01fc89..52eb14aab8d 100644 --- a/source/blender/editors/screen/screen_ops.c +++ b/source/blender/editors/screen/screen_ops.c @@ -3800,7 +3800,7 @@ static int fullscreen_back_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } - ED_screen_full_prevspace(C, sa); + ED_screen_full_prevspace(C, sa, false); return OPERATOR_FINISHED; } |