Fix (unreported) ED_region_tag_redraw_partial() could override a previously defined partial redraw, instead of extending it.
Probably not an issue currently, since partial redraw is not much used (only from sculpt code and box-rendering it seems?), but logic was broken here.
This commit is contained in:
parent
bbc1507871
commit
65e7caf950
|
@ -580,15 +580,20 @@ void ED_region_tag_refresh_ui(ARegion *ar)
|
|||
void ED_region_tag_redraw_partial(ARegion *ar, const rcti *rct)
|
||||
{
|
||||
if (ar && !(ar->do_draw & RGN_DRAWING)) {
|
||||
if (!(ar->do_draw & RGN_DRAW)) {
|
||||
if (!(ar->do_draw & (RGN_DRAW | RGN_DRAW_PARTIAL))) {
|
||||
/* no redraw set yet, set partial region */
|
||||
ar->do_draw |= RGN_DRAW_PARTIAL;
|
||||
ar->drawrct = *rct;
|
||||
}
|
||||
else if (ar->drawrct.xmin != ar->drawrct.xmax) {
|
||||
BLI_assert((ar->do_draw & RGN_DRAW_PARTIAL) != 0);
|
||||
/* partial redraw already set, expand region */
|
||||
BLI_rcti_union(&ar->drawrct, rct);
|
||||
}
|
||||
else {
|
||||
BLI_assert((ar->do_draw & RGN_DRAW) != 0);
|
||||
/* Else, full redraw is already requested, nothing to do here. */
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue