Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9ca66ae

Browse files
jklymaktacaswell
authored andcommitted
Merge pull request #10254 from anntzer/revert-cursor
Quick and dirty revert of busy cursor for 2.1.2. Conflicts: lib/matplotlib/backends/backend_gtk3cairo.py - other changes to adjacent code, backported minimal change
1 parent 6d9eab7 commit 9ca66ae

File tree

3 files changed

+12
-13
lines changed

3 files changed

+12
-13
lines changed

lib/matplotlib/backends/backend_agg.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -425,12 +425,12 @@ def draw(self):
425425

426426
toolbar = self.toolbar
427427
try:
428-
if toolbar:
429-
toolbar.set_cursor(cursors.WAIT)
428+
# if toolbar:
429+
# toolbar.set_cursor(cursors.WAIT)
430430
self.figure.draw(self.renderer)
431431
finally:
432-
if toolbar:
433-
toolbar.set_cursor(toolbar._lastCursor)
432+
# if toolbar:
433+
# toolbar.set_cursor(toolbar._lastCursor)
434434
RendererAgg.lock.release()
435435

436436
def get_renderer(self, cleared=False):

lib/matplotlib/backends/backend_gtk.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -388,8 +388,8 @@ def expose_event(self, widget, event):
388388
"""Expose_event for all GTK backends. Should not be overridden.
389389
"""
390390
toolbar = self.toolbar
391-
if toolbar:
392-
toolbar.set_cursor(cursors.WAIT)
391+
# if toolbar:
392+
# toolbar.set_cursor(cursors.WAIT)
393393
if GTK_WIDGET_DRAWABLE(self):
394394
if self._need_redraw:
395395
x, y, w, h = self.allocation
@@ -399,8 +399,8 @@ def expose_event(self, widget, event):
399399
x, y, w, h = event.area
400400
self.window.draw_drawable (self.style.fg_gc[self.state],
401401
self._pixmap, x, y, x, y, w, h)
402-
if toolbar:
403-
toolbar.set_cursor(toolbar._lastCursor)
402+
# if toolbar:
403+
# toolbar.set_cursor(toolbar._lastCursor)
404404
return False # finish event propagation?
405405

406406
filetypes = FigureCanvasBase.filetypes.copy()
@@ -481,7 +481,6 @@ def flush_events(self):
481481
gtk.gdk.threads_leave()
482482

483483

484-
485484
class FigureManagerGTK(FigureManagerBase):
486485
"""
487486
Attributes

lib/matplotlib/backends/backend_gtk3cairo.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,14 @@ def on_draw_event(self, widget, ctx):
3737
""" GtkDrawable draw event, like expose_event in GTK 2.X
3838
"""
3939
toolbar = self.toolbar
40-
if toolbar:
41-
toolbar.set_cursor(cursors.WAIT)
40+
# if toolbar:
41+
# toolbar.set_cursor(cursors.WAIT)
4242
self._renderer.set_context(ctx)
4343
allocation = self.get_allocation()
4444
x, y, w, h = allocation.x, allocation.y, allocation.width, allocation.height
4545
self._render_figure(w, h)
46-
if toolbar:
47-
toolbar.set_cursor(toolbar._lastCursor)
46+
# if toolbar:
47+
# toolbar.set_cursor(toolbar._lastCursor)
4848
return False # finish event propagation?
4949

5050

0 commit comments

Comments
 (0)