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

Skip to content

Commit 91f5560

Browse files
tacaswellMeeseeksDev[bot]
authored andcommitted
Backport PR #15857: LassoSelection shouldn't useblit on canvas not supporting blitting.
1 parent e2a49d6 commit 91f5560

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

lib/matplotlib/widgets.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2455,15 +2455,12 @@ def __init__(self, ax, onselect=None, useblit=True, lineprops=None,
24552455
button=None):
24562456
_SelectorWidget.__init__(self, ax, onselect, useblit=useblit,
24572457
button=button)
2458-
24592458
self.verts = None
2460-
24612459
if lineprops is None:
24622460
lineprops = dict()
2463-
if useblit:
2464-
lineprops['animated'] = True
2461+
# self.useblit may be != useblit, if the canvas doesn't support blit.
2462+
lineprops.update(animated=self.useblit, visible=False)
24652463
self.line = Line2D([], [], **lineprops)
2466-
self.line.set_visible(False)
24672464
self.ax.add_line(self.line)
24682465
self.artists = [self.line]
24692466

0 commit comments

Comments
 (0)