Commit 36448e8
committed
FIX: prevent recursive draws with plt.ion not in IPython with qt5agg
In 9b8a944 the latch logic was moved
above the call to `self.draw` to de-latch the call to
`__draw_idle_agg` in `paintEvent` to protect against `blit` calls
during a draw.
However, this now fails to properly latch the base draw so with
`plt.ion` (not in IPython) the stale callback will cause a (possibly
infinite) recursion in the draw due to stale being set as part of the
draw call (which will re-trigger the draw).
This adds a second flag to track if we are currently rendering and
bail.
closes #101401 parent 008da38 commit 36448e8
1 file changed
Lines changed: 11 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| 38 | + | |
38 | 39 | | |
39 | 40 | | |
40 | 41 | | |
| |||
124 | 125 | | |
125 | 126 | | |
126 | 127 | | |
127 | | - | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
128 | 136 | | |
129 | 137 | | |
130 | 138 | | |
| |||
135 | 143 | | |
136 | 144 | | |
137 | 145 | | |
138 | | - | |
| 146 | + | |
139 | 147 | | |
140 | 148 | | |
141 | 149 | | |
| |||
146 | 154 | | |
147 | 155 | | |
148 | 156 | | |
| 157 | + | |
149 | 158 | | |
150 | 159 | | |
151 | 160 | | |
| |||
0 commit comments