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:
Diffstat (limited to 'source/blender/editors/screen/area.c')
-rw-r--r--source/blender/editors/screen/area.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c
index 26c48dda4f4..01e0ae812cc 100644
--- a/source/blender/editors/screen/area.c
+++ b/source/blender/editors/screen/area.c
@@ -629,7 +629,7 @@ void ED_region_tag_redraw(ARegion *ar)
* but python scripts can cause this to happen indirectly */
if (ar && !(ar->do_draw & RGN_DRAWING)) {
/* zero region means full region redraw */
- ar->do_draw &= ~(RGN_DRAW_PARTIAL | RGN_DRAW_NO_REBUILD);
+ ar->do_draw &= ~(RGN_DRAW_PARTIAL | RGN_DRAW_NO_REBUILD | RGN_DRAW_EDITOR_OVERLAYS);
ar->do_draw |= RGN_DRAW;
memset(&ar->drawrct, 0, sizeof(ar->drawrct));
}
@@ -645,7 +645,7 @@ void ED_region_tag_redraw_overlay(ARegion *ar)
void ED_region_tag_redraw_no_rebuild(ARegion *ar)
{
if (ar && !(ar->do_draw & (RGN_DRAWING | RGN_DRAW))) {
- ar->do_draw &= ~RGN_DRAW_PARTIAL;
+ ar->do_draw &= ~(RGN_DRAW_PARTIAL | RGN_DRAW_EDITOR_OVERLAYS);
ar->do_draw |= RGN_DRAW_NO_REBUILD;
memset(&ar->drawrct, 0, sizeof(ar->drawrct));
}
@@ -658,6 +658,22 @@ void ED_region_tag_refresh_ui(ARegion *ar)
}
}
+/**
+ * Tag editor overlays to be redrawn. If in doubt about which parts need to be redrawn (partial
+ * clipping rectangle set), redraw everything.
+ */
+void ED_region_tag_redraw_editor_overlays(struct ARegion *ar)
+{
+ if (ar && !(ar->do_draw & (RGN_DRAWING | RGN_DRAW))) {
+ if (ar->do_draw & RGN_DRAW_PARTIAL) {
+ ED_region_tag_redraw(ar);
+ }
+ else {
+ ar->do_draw |= RGN_DRAW_EDITOR_OVERLAYS;
+ }
+ }
+}
+
void ED_region_tag_redraw_partial(ARegion *ar, const rcti *rct, bool rebuild)
{
if (ar && !(ar->do_draw & RGN_DRAWING)) {