From cf34798a70ba57c546881e8d4bb5c779568f6ea7 Mon Sep 17 00:00:00 2001 From: Antony Lee Date: Mon, 15 Jan 2018 12:28:29 -0800 Subject: [PATCH] Quick and dirty revert of busy cursor for 2.1.2. --- lib/matplotlib/backends/backend_agg.py | 8 ++++---- lib/matplotlib/backends/backend_gtk.py | 9 ++++----- lib/matplotlib/backends/backend_gtk3cairo.py | 8 ++++---- 3 files changed, 12 insertions(+), 13 deletions(-) diff --git a/lib/matplotlib/backends/backend_agg.py b/lib/matplotlib/backends/backend_agg.py index 1741e140ae0e..9858ee0691b8 100644 --- a/lib/matplotlib/backends/backend_agg.py +++ b/lib/matplotlib/backends/backend_agg.py @@ -427,12 +427,12 @@ def draw(self): toolbar = self.toolbar try: - if toolbar: - toolbar.set_cursor(cursors.WAIT) + # if toolbar: + # toolbar.set_cursor(cursors.WAIT) self.figure.draw(self.renderer) finally: - if toolbar: - toolbar.set_cursor(toolbar._lastCursor) + # if toolbar: + # toolbar.set_cursor(toolbar._lastCursor) RendererAgg.lock.release() def get_renderer(self, cleared=False): diff --git a/lib/matplotlib/backends/backend_gtk.py b/lib/matplotlib/backends/backend_gtk.py index 0ffe6ec01f3e..fb8bd1a6ec9a 100644 --- a/lib/matplotlib/backends/backend_gtk.py +++ b/lib/matplotlib/backends/backend_gtk.py @@ -393,8 +393,8 @@ def expose_event(self, widget, event): """Expose_event for all GTK backends. Should not be overridden. """ toolbar = self.toolbar - if toolbar: - toolbar.set_cursor(cursors.WAIT) + # if toolbar: + # toolbar.set_cursor(cursors.WAIT) if GTK_WIDGET_DRAWABLE(self): if self._need_redraw: x, y, w, h = self.allocation @@ -404,8 +404,8 @@ def expose_event(self, widget, event): x, y, w, h = event.area self.window.draw_drawable (self.style.fg_gc[self.state], self._pixmap, x, y, x, y, w, h) - if toolbar: - toolbar.set_cursor(toolbar._lastCursor) + # if toolbar: + # toolbar.set_cursor(toolbar._lastCursor) return False # finish event propagation? filetypes = FigureCanvasBase.filetypes.copy() @@ -486,7 +486,6 @@ def flush_events(self): gtk.gdk.threads_leave() - class FigureManagerGTK(FigureManagerBase): """ Attributes diff --git a/lib/matplotlib/backends/backend_gtk3cairo.py b/lib/matplotlib/backends/backend_gtk3cairo.py index 7b55f0e8007c..2591b112d2c9 100644 --- a/lib/matplotlib/backends/backend_gtk3cairo.py +++ b/lib/matplotlib/backends/backend_gtk3cairo.py @@ -35,13 +35,13 @@ def _render_figure(self, width, height): def on_draw_event(self, widget, ctx): """GtkDrawable draw event.""" toolbar = self.toolbar - if toolbar: - toolbar.set_cursor(cursors.WAIT) + # if toolbar: + # toolbar.set_cursor(cursors.WAIT) self._renderer.set_context(ctx) allocation = self.get_allocation() self._render_figure(allocation.width, allocation.height) - if toolbar: - toolbar.set_cursor(toolbar._lastCursor) + # if toolbar: + # toolbar.set_cursor(toolbar._lastCursor) return False # finish event propagation?