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

Skip to content

Fix minor bug in vertex insert #9396

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Oct 21, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
DOC: tweak how initial draw and updates are handled
  • Loading branch information
tacaswell committed Oct 21, 2017
commit bcfd4f5e2ff3c1c6a573572354267a73a64a26f2
7 changes: 4 additions & 3 deletions examples/event_handling/poly_editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ def draw_callback(self, event):
self.background = self.canvas.copy_from_bbox(self.ax.bbox)
self.ax.draw_artist(self.poly)
self.ax.draw_artist(self.line)
self.canvas.blit(self.ax.bbox)
# do not need to blit here, this will fire before the screen is
# updated

def poly_changed(self, poly):
'this method is called whenever the polygon object is called'
Expand Down Expand Up @@ -131,8 +132,8 @@ def key_press_callback(self, event):
axis=0)
self.line.set_data(zip(*self.poly.xy))
break

self.canvas.draw()
if self.line.stale:
self.canvas.draw_idle()

def motion_notify_callback(self, event):
'on mouse movement'
Expand Down