From e15f85f23dd33a91a9a386c23cbc80ecea3f9ac1 Mon Sep 17 00:00:00 2001 From: Julian Eisel Date: Wed, 17 Jun 2020 20:21:15 +0200 Subject: [PATCH] UI: Avoid rebuilding outliner tree when changing area size In big files, ie typical production files, resizing the outliner area would be very slow. The outliner tree would be rebuilt then, which can easily be avoided. --- source/blender/editors/screen/area.c | 9 ++++++++- source/blender/editors/screen/screen_ops.c | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c index 5ea02de1e45..1adf7f84bbf 100644 --- a/source/blender/editors/screen/area.c +++ b/source/blender/editors/screen/area.c @@ -1556,7 +1556,14 @@ static void region_rect_recursive( /* Tag for redraw if size changes. */ if (region->winx != prev_winx || region->winy != prev_winy) { - ED_region_tag_redraw(region); + /* 3D View needs a full rebuild in case a progressive render runs. Rest can live with + * no-rebuild (e.g. Outliner) */ + if (area->spacetype == SPACE_VIEW3D) { + ED_region_tag_redraw(region); + } + else { + ED_region_tag_redraw_no_rebuild(region); + } } /* Clear, initialize on demand. */ diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c index 1d03b277549..37a8880e7a1 100644 --- a/source/blender/editors/screen/screen_ops.c +++ b/source/blender/editors/screen/screen_ops.c @@ -1761,7 +1761,7 @@ static void area_move_apply_do(const bContext *C, screen->do_refresh = true; redraw_all = true; } - ED_area_tag_redraw(area); + ED_area_tag_redraw_no_rebuild(area); } } if (redraw_all) {