forked from bartvdbraak/blender
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.
This commit is contained in:
parent
7214001cdb
commit
f92bb64505
@ -6183,7 +6183,7 @@ static void direct_link_region(FileData *fd, ARegion *ar, int spacetype)
|
|||||||
ar->swinid = 0;
|
ar->swinid = 0;
|
||||||
ar->type = NULL;
|
ar->type = NULL;
|
||||||
ar->swap = 0;
|
ar->swap = 0;
|
||||||
ar->do_draw = FALSE;
|
ar->do_draw = 0;
|
||||||
ar->regiontimer = NULL;
|
ar->regiontimer = NULL;
|
||||||
memset(&ar->drawrct, 0, sizeof(ar->drawrct));
|
memset(&ar->drawrct, 0, sizeof(ar->drawrct));
|
||||||
}
|
}
|
||||||
|
@ -420,6 +420,8 @@ void ED_region_do_draw(bContext *C, ARegion *ar)
|
|||||||
scissor_pad = false;
|
scissor_pad = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ar->do_draw |= RGN_DRAWING;
|
||||||
|
|
||||||
/* note; this sets state, so we can use wmOrtho and friends */
|
/* note; this sets state, so we can use wmOrtho and friends */
|
||||||
wmSubWindowScissorSet(win, ar->swinid, &ar->drawrct, scissor_pad);
|
wmSubWindowScissorSet(win, ar->swinid, &ar->drawrct, scissor_pad);
|
||||||
|
|
||||||
@ -453,7 +455,7 @@ void ED_region_do_draw(bContext *C, ARegion *ar)
|
|||||||
glDisable(GL_BLEND);
|
glDisable(GL_BLEND);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
ar->do_draw = FALSE;
|
ar->do_draw = 0;
|
||||||
memset(&ar->drawrct, 0, sizeof(ar->drawrct));
|
memset(&ar->drawrct, 0, sizeof(ar->drawrct));
|
||||||
|
|
||||||
uiFreeInactiveBlocks(C, &ar->uiblocks);
|
uiFreeInactiveBlocks(C, &ar->uiblocks);
|
||||||
@ -469,7 +471,9 @@ void ED_region_do_draw(bContext *C, ARegion *ar)
|
|||||||
|
|
||||||
void ED_region_tag_redraw(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 */
|
/* zero region means full region redraw */
|
||||||
ar->do_draw = RGN_DRAW;
|
ar->do_draw = RGN_DRAW;
|
||||||
memset(&ar->drawrct, 0, sizeof(ar->drawrct));
|
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)
|
void ED_region_tag_redraw_partial(ARegion *ar, rcti *rct)
|
||||||
{
|
{
|
||||||
if (ar) {
|
if (ar && !(ar->do_draw & RGN_DRAWING)) {
|
||||||
if (!ar->do_draw) {
|
if (!ar->do_draw) {
|
||||||
/* no redraw set yet, set partial region */
|
/* no redraw set yet, set partial region */
|
||||||
ar->do_draw = RGN_DRAW_PARTIAL;
|
ar->do_draw = RGN_DRAW_PARTIAL;
|
||||||
|
@ -365,6 +365,7 @@ enum {
|
|||||||
/* region do_draw */
|
/* region do_draw */
|
||||||
#define RGN_DRAW 1
|
#define RGN_DRAW 1
|
||||||
#define RGN_DRAW_PARTIAL 2
|
#define RGN_DRAW_PARTIAL 2
|
||||||
|
#define RGN_DRAWING 4
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user