mirror of
https://github.com/wassname/scikit-image.git
synced 2026-07-03 08:37:02 +08:00
Clear the blit background when the image changes
This commit is contained in:
@@ -77,6 +77,8 @@ class BlitManager(object):
|
||||
self.canvas.restore_region(self.background)
|
||||
self.draw_artists()
|
||||
self.canvas.blit(self.ax.bbox)
|
||||
else:
|
||||
self.canvas.draw_idle()
|
||||
|
||||
def draw_artists(self):
|
||||
for artist in self.artists:
|
||||
@@ -368,6 +370,9 @@ class ImageViewer(QtGui.QMainWindow):
|
||||
clim = (0, clim[1])
|
||||
self._image_plot.set_clim(clim)
|
||||
|
||||
if self.useblit:
|
||||
self._blit_manager.background = None
|
||||
|
||||
self.redraw()
|
||||
|
||||
def reset_image(self):
|
||||
|
||||
Reference in New Issue
Block a user