Fix T63439: too many 3D viewport redraws due to fading scrollbars.

Only redraw the regions, not the entire editor.
This commit is contained in:
2019-04-16 01:22:40 +02:00
parent e2102e9917
commit 9d06dc1496

View File

@@ -789,37 +789,33 @@ static AZone *area_actionzone_refresh_xy(ScrArea *sa, const int xy[2], const boo
}
if (redraw) {
ED_area_tag_redraw_no_rebuild(sa);
ED_region_tag_redraw_no_rebuild(ar);
}
/* Don't return! */
}
}
}
else if (!test_only && !IS_EQF(az->alpha, 0.0f)) {
bool changed = false;
if (az->type == AZONE_FULLSCREEN) {
az->alpha = 0.0f;
changed = true;
sa->flag &= ~AREA_FLAG_ACTIONZONES_UPDATE;
ED_area_tag_redraw_no_rebuild(sa);
}
else if (az->type == AZONE_REGION_SCROLL) {
if (az->direction == AZ_SCROLL_VERT) {
az->alpha = az->ar->v2d.alpha_vert = 0;
changed = true;
sa->flag &= ~AREA_FLAG_ACTIONZONES_UPDATE;
ED_region_tag_redraw_no_rebuild(az->ar);
}
else if (az->direction == AZ_SCROLL_HOR) {
az->alpha = az->ar->v2d.alpha_hor = 0;
changed = true;
sa->flag &= ~AREA_FLAG_ACTIONZONES_UPDATE;
ED_region_tag_redraw_no_rebuild(az->ar);
}
else {
BLI_assert(0);
}
}
if (changed) {
sa->flag &= ~AREA_FLAG_ACTIONZONES_UPDATE;
ED_area_tag_redraw_no_rebuild(sa);
}
}
}