[Bf-blender-cvs] [5c72a4d4526] master: Fix T84780: Corrupt screen layout when loading file with area full-screen

Julian Eisel noreply at git.blender.org
Mon Feb 1 12:48:23 CET 2021


Commit: 5c72a4d45269638c7a8f72151db6cfd2b8895c35
Author: Julian Eisel
Date:   Mon Feb 1 00:40:15 2021 +0100
Branches: master
https://developer.blender.org/rB5c72a4d45269638c7a8f72151db6cfd2b8895c35

Fix T84780: Corrupt screen layout when loading file with area full-screen

This could happen with files saved before ef4aa42ea4ff, so before global areas
were written to .blend files.
We would just always add the top- and status-bar, even though the screen wasn't
supposed to have them. I'm not entirely sure what caused the further issues
observed there, most code should probably handle the case fine still. But
apparently something didn't.

Steps to reproduce were:
* Open Blender from before ef4aa42ea4ff (e.g 2.91 release)
* In 3D View, View > Area > Toggle Fullscreen Area
* Save the file
* Open the saved file (can be in newer version too)
The fullscreen is corrupt now, especially noticable after duplicating the
workspace.

===================================================================

M	source/blender/editors/screen/screen_edit.c

===================================================================

diff --git a/source/blender/editors/screen/screen_edit.c b/source/blender/editors/screen/screen_edit.c
index be52874ed0b..0868d5a5fe9 100644
--- a/source/blender/editors/screen/screen_edit.c
+++ b/source/blender/editors/screen/screen_edit.c
@@ -871,6 +871,11 @@ static void screen_global_area_refresh(wmWindow *win,
                                        const short height_min,
                                        const short height_max)
 {
+  /* Full-screens shouldn't have global areas. Don't touch them. */
+  if (screen->state == SCREENFULL) {
+    return;
+  }
+
   ScrArea *area = NULL;
   LISTBASE_FOREACH (ScrArea *, area_iter, &win->global_areas.areabase) {
     if (area_iter->spacetype == space_type) {



More information about the Bf-blender-cvs mailing list