Draw method for singleshot timer This draw method can be added to a singleshot timer, which can accumulate draws while the eventloop is spinning. This method will then only draw the first time and short-circuit the others.
(self)
| 77 | timer.start() |
| 78 | |
| 79 | def _draw_idle(self): |
| 80 | """ |
| 81 | Draw method for singleshot timer |
| 82 | |
| 83 | This draw method can be added to a singleshot timer, which can |
| 84 | accumulate draws while the eventloop is spinning. This method will |
| 85 | then only draw the first time and short-circuit the others. |
| 86 | """ |
| 87 | with self._idle_draw_cntx(): |
| 88 | if not self._draw_pending: |
| 89 | # Short-circuit because our draw request has already been |
| 90 | # taken care of |
| 91 | return |
| 92 | self._draw_pending = False |
| 93 | self.draw() |
| 94 | |
| 95 | def blit(self, bbox=None): |
| 96 | # docstring inherited |
nothing calls this directly
no test coverage detected