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.
This commit is contained in:
Julian Eisel 2020-06-17 20:21:15 +02:00
parent ce7a5a2376
commit e15f85f23d
2 changed files with 9 additions and 2 deletions

View File

@ -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. */

View File

@ -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) {