Do actual rendering async

This prevents some "index" errors on the view tree, when items are newly added to
the canvas and have not been updated by the view yet. The error is not blocking
(a new update cycle is already scheduled), but it will cause some stack traces
to be printed.
This commit is contained in:
Arjan Molenaar 2019-05-24 14:17:30 +02:00
parent 43daf0fa0e
commit 05dcfbab2d

View File

@ -782,6 +782,7 @@ class GtkView(Gtk.DrawingArea, Gtk.Scrollable, View):
finally:
cr.restore()
@AsyncIO(single=True)
def update_back_buffer(self):
if self.canvas and self._back_buffer:
cr = cairo.Context(self._back_buffer)