From ea2043eb3a31468d9afeb1d6cc140567e219565f Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 15 Jun 2014 01:40:15 +1000 Subject: UI: Add support for popups to refresh their layput (D578) This is needed for popups to chance state once activated, currently it makes use of operators `check` callback, after values are modified, as the file selector does already. --- source/blender/editors/screen/area.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'source/blender/editors/screen') diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c index 42c61913aa1..1727f38c4b3 100644 --- a/source/blender/editors/screen/area.c +++ b/source/blender/editors/screen/area.c @@ -472,6 +472,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; /* just incase */ ar->do_draw = RGN_DRAW; memset(&ar->drawrct, 0, sizeof(ar->drawrct)); } @@ -483,6 +484,13 @@ void ED_region_tag_redraw_overlay(ARegion *ar) ar->do_draw_overlay = RGN_DRAW; } +void ED_region_tag_refresh_ui(ARegion *ar) +{ + if (ar) { + ar->do_draw |= RGN_DRAW_REFRESH_UI; + } +} + void ED_region_tag_redraw_partial(ARegion *ar, rcti *rct) { if (ar && !(ar->do_draw & RGN_DRAWING)) { -- cgit v1.2.3