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

Skip to content

Commit e802991

Browse files
committed
Fix failing tests
1 parent 3ffd7c0 commit e802991

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

lib/matplotlib/tests/test_widgets.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ def onselect(epress, erelease):
173173
pass
174174

175175
tool = widgets.RectangleSelector(ax, onselect=onselect,
176-
maxdist=10)
176+
maxdist=10, interactive=True)
177177
tool.extents = (100, 150, 100, 150)
178178

179179
assert tool.corners == (

lib/matplotlib/widgets.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1853,7 +1853,7 @@ def _onmove(self, event):
18531853
y2 = event.ydata
18541854

18551855
# move existing shape
1856-
elif self.active_handle == 'C' or 'move' in self.state:
1856+
elif 'move' in self.state:
18571857
x1, x2, y1, y2 = self._extents_on_press
18581858
dx = event.xdata - self.eventpress.xdata
18591859
dy = event.ydata - self.eventpress.ydata

0 commit comments

Comments
 (0)