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:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2013-12-18 15:02:31 +0400
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2013-12-18 15:02:31 +0400
commitf92bb6450571d6ac9ed31ccbd9d4d73a2c39b12e (patch)
tree04cb4cb28d776033b8769da5ddfd8ac651116093 /source/blender/editors/screen/area.c
parent7214001cdb142cb2556135b1f6e35290c62b9a69 (diff)
Fix T37843: area split widget missing in python console editor.
Python was indirectly causing redraw tags during drawing, which interfered with the ARegion.drawrct, now ignore these during draw.
Diffstat (limited to 'source/blender/editors/screen/area.c')
-rw-r--r--source/blender/editors/screen/area.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c
index 2fd3423b7e7..a1daa3b4449 100644
--- a/source/blender/editors/screen/area.c
+++ b/source/blender/editors/screen/area.c
@@ -419,6 +419,8 @@ void ED_region_do_draw(bContext *C, ARegion *ar)
BLI_rcti_isect(&ar->winrct, &ar->drawrct, &ar->drawrct);
scissor_pad = false;
}
+
+ ar->do_draw |= RGN_DRAWING;
/* note; this sets state, so we can use wmOrtho and friends */
wmSubWindowScissorSet(win, ar->swinid, &ar->drawrct, scissor_pad);
@@ -453,7 +455,7 @@ void ED_region_do_draw(bContext *C, ARegion *ar)
glDisable(GL_BLEND);
#endif
- ar->do_draw = FALSE;
+ ar->do_draw = 0;
memset(&ar->drawrct, 0, sizeof(ar->drawrct));
uiFreeInactiveBlocks(C, &ar->uiblocks);
@@ -469,7 +471,9 @@ void ED_region_do_draw(bContext *C, ARegion *ar)
void ED_region_tag_redraw(ARegion *ar)
{
- if (ar) {
+ /* don't tag redraw while drawing, it shouldn't happen normally
+ * 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;
memset(&ar->drawrct, 0, sizeof(ar->drawrct));
@@ -484,7 +488,7 @@ void ED_region_tag_redraw_overlay(ARegion *ar)
void ED_region_tag_redraw_partial(ARegion *ar, rcti *rct)
{
- if (ar) {
+ if (ar && !(ar->do_draw & RGN_DRAWING)) {
if (!ar->do_draw) {
/* no redraw set yet, set partial region */
ar->do_draw = RGN_DRAW_PARTIAL;