From a567e5b0b1b53b2a489bd9f5fc2465e2f66fc0b9 Mon Sep 17 00:00:00 2001 From: Thomas A Caswell Date: Wed, 15 May 2024 16:03:26 -0400 Subject: [PATCH] DOC: we do not need the blit call in on_draw on_draw is triggered via the draw_event callback which is processed after the rest of the rendering in finished, but before the buffer is painted to the screen so the `blit` call was at best redundent (causing two copies of the buffer from our side to the GUI side) and at worst causes segfaults in some versions of Qt. Closes #28002 --- galleries/examples/event_handling/path_editor.py | 1 - 1 file changed, 1 deletion(-) diff --git a/galleries/examples/event_handling/path_editor.py b/galleries/examples/event_handling/path_editor.py index d6e84b454008..2af54bad53ed 100644 --- a/galleries/examples/event_handling/path_editor.py +++ b/galleries/examples/event_handling/path_editor.py @@ -94,7 +94,6 @@ def on_draw(self, event): self.background = self.canvas.copy_from_bbox(self.ax.bbox) self.ax.draw_artist(self.pathpatch) self.ax.draw_artist(self.line) - self.canvas.blit(self.ax.bbox) def on_button_press(self, event): """Callback for mouse button presses."""