diff options
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/screen/screen_edit.c | 9 | ||||
-rw-r--r-- | source/blender/windowmanager/intern/wm_event_system.c | 8 |
2 files changed, 10 insertions, 7 deletions
diff --git a/source/blender/editors/screen/screen_edit.c b/source/blender/editors/screen/screen_edit.c index 37b4603974f..569d6116111 100644 --- a/source/blender/editors/screen/screen_edit.c +++ b/source/blender/editors/screen/screen_edit.c @@ -1791,6 +1791,8 @@ ScrArea *ED_screen_full_newspace(bContext *C, ScrArea *sa, int type) */ void ED_screen_full_prevspace(bContext *C, ScrArea *sa, const bool was_prev_temp) { + BLI_assert(sa->full); + 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); @@ -1800,12 +1802,7 @@ void ED_screen_full_prevspace(bContext *C, ScrArea *sa, const bool was_prev_temp } } else { - if (sa->full) { - ED_screen_restore_temp_type(C, sa); - } - else { - ED_area_prevspace(C, sa); - } + ED_screen_restore_temp_type(C, sa); } } diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c index ff67758db11..187c11ef3da 100644 --- a/source/blender/windowmanager/intern/wm_event_system.c +++ b/source/blender/windowmanager/intern/wm_event_system.c @@ -1801,7 +1801,13 @@ static int wm_handler_fileselect_do(bContext *C, ListBase *handlers, wmEventHand const SpaceLink *sl = sa->spacedata.first; const bool was_prev_temp = (sl->next && sl->next->spacetype == SPACE_IMAGE); - ED_screen_full_prevspace(C, sa, was_prev_temp); + if (sa->full) { + ED_screen_full_prevspace(C, sa, was_prev_temp); + } + /* user may have left fullscreen */ + else { + ED_area_prevspace(C, sa); + } } wm_handler_op_context(C, handler, CTX_wm_window(C)->eventstate); |