Skip to content

Commit a8934dc

Browse files
committed
ENH: when re-drawing the span clear previous span
Force a full re-draw on the last span is not in the blit background
1 parent 83b322a commit a8934dc

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/matplotlib/widgets.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1488,7 +1488,10 @@ def _press(self, event):
14881488
self.rect.set_visible(self.visible)
14891489
if self.span_stays:
14901490
self.stay_rect.set_visible(False)
1491-
1491+
# really force a draw so that the stay rect is not in
1492+
# the blit background
1493+
if self.useblit:
1494+
self.canvas.draw()
14921495
xdata, ydata = self._get_data(event)
14931496
if self.direction == 'horizontal':
14941497
self.pressv = xdata

0 commit comments

Comments
 (0)