Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2016-07-18 15:37:04 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2016-07-18 15:41:56 +0300
commit65e7caf950d94496caf3a538ddfc3cc0683fd86d (patch)
tree2cb3d9bf1dfe9fd65ff30c224a9af1f2574fafe0 /source/blender/editors/screen
parentbbc15078710a15642982bd4e72e973b1d496598c (diff)
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.
Diffstat (limited to 'source/blender/editors/screen')
-rw-r--r--source/blender/editors/screen/area.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c
index ab8b7d4e138..8d058ed2081 100644
--- a/source/blender/editors/screen/area.c
+++ b/source/blender/editors/screen/area.c
@@ -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. */
+ }
}
}