diff options
Diffstat (limited to 'source/blender/editors/screen/screen_edit.c')
-rw-r--r-- | source/blender/editors/screen/screen_edit.c | 12 |
1 files changed, 9 insertions, 3 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); |