diff options
Diffstat (limited to 'source/blender/editors/screen/screen_edit.c')
-rw-r--r-- | source/blender/editors/screen/screen_edit.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/source/blender/editors/screen/screen_edit.c b/source/blender/editors/screen/screen_edit.c index 815940864ac..319a4f44084 100644 --- a/source/blender/editors/screen/screen_edit.c +++ b/source/blender/editors/screen/screen_edit.c @@ -519,6 +519,17 @@ void ED_screen_ensure_updated(wmWindowManager *wm, wmWindow *win, bScreen *scree } } +/** + * Utility to exit and free an area-region. Screen level regions (menus/popups) need to be treated + * slightly differently, see #ui_region_temp_remove(). + */ +void ED_region_remove(bContext *C, ScrArea *sa, ARegion *ar) +{ + ED_region_exit(C, ar); + BKE_area_region_free(sa->type, ar); + BLI_freelinkN(&sa->regionbase, ar); +} + /* *********** exit calls are for closing running stuff ******** */ void ED_region_exit(bContext *C, ARegion *ar) |