forked from bartvdbraak/blender
* Some code optimizations to panel collapse code, to avoid calculations for each panel. Suggested by "Bao 2".
This commit is contained in:
parent
3091c9d440
commit
d02b6707f9
@ -167,11 +167,11 @@ static int panels_re_align(ScrArea *sa, ARegion *ar, Panel **r_pa)
|
||||
static void panels_collapse_all(ScrArea *sa, ARegion *ar)
|
||||
{
|
||||
Panel *pa;
|
||||
int align = panel_aligned(sa, ar);
|
||||
int flag = ((panel_aligned(sa, ar)==BUT_HORIZONTAL)? PNL_CLOSEDX: PNL_CLOSEDY);
|
||||
|
||||
for (pa= ar->panels.first; pa; pa= pa->next) {
|
||||
if (pa->type && !(pa->type->flag & PNL_NO_HEADER))
|
||||
pa->flag = (align==BUT_HORIZONTAL)? PNL_CLOSEDX: PNL_CLOSEDY;
|
||||
pa->flag = flag;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user