Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source/blender/editors/screen/screen_edit.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/editors/screen/screen_edit.c b/source/blender/editors/screen/screen_edit.c
index 21800536503..e2d95035ba8 100644
--- a/source/blender/editors/screen/screen_edit.c
+++ b/source/blender/editors/screen/screen_edit.c
@@ -1564,6 +1564,14 @@ ScrArea *ED_screen_state_toggle(bContext *C, wmWindow *win, ScrArea *area, const
BLI_assert(CTX_wm_screen(C) == screen);
BLI_assert(CTX_wm_area(C) == NULL); /* May have been freed. */
+ /* Setting the area is only needed for Python scripts that call
+ * operators in succession before returning to the main event loop.
+ * Without this, scripts can't run any operators that require
+ * an area after toggling full-screen for example (see: T89526).
+ * NOTE: an old comment stated this was "bad code",
+ * however it doesn't cause problems so leave as-is. */
+ CTX_wm_area_set(C, screen->areabase.first);
+
return screen->areabase.first;
}