Set FQDN to nodes
This commit is contained in:
parent
55f881d44e
commit
68ed839fcb
|
|
@ -455,15 +455,15 @@ def test_rectangle_rotate(ax, selector_class):
|
|||
# Draw rectangle
|
||||
click_and_drag(tool, start=(100, 100), end=(130, 140))
|
||||
assert tool.extents == (100, 130, 100, 140)
|
||||
assert len(tool._state) == 0
|
||||
assert len(tool.state) == 0
|
||||
|
||||
# Rotate anticlockwise using top-right corner
|
||||
do_event(tool, 'on_key_press', key='r')
|
||||
assert tool._state == {'rotate'}
|
||||
assert len(tool._state) == 1
|
||||
assert tool.state == {'rotate'}
|
||||
assert len(tool.state) == 1
|
||||
click_and_drag(tool, start=(130, 140), end=(120, 145))
|
||||
do_event(tool, 'on_key_press', key='r')
|
||||
assert len(tool._state) == 0
|
||||
assert len(tool.state) == 0
|
||||
# Extents shouldn't change (as shape of rectangle hasn't changed)
|
||||
assert tool.extents == (100, 130, 100, 140)
|
||||
assert_allclose(tool.rotation, 25.56, atol=0.01)
|
||||
|
|
@ -488,12 +488,12 @@ def test_rectangle_add_remove_set(ax):
|
|||
# Draw rectangle
|
||||
click_and_drag(tool, start=(100, 100), end=(130, 140))
|
||||
assert tool.extents == (100, 130, 100, 140)
|
||||
assert len(tool._state) == 0
|
||||
assert len(tool.state) == 0
|
||||
for state in ['rotate', 'square', 'center']:
|
||||
tool.add_state(state)
|
||||
assert len(tool._state) == 1
|
||||
assert len(tool.state) == 1
|
||||
tool.remove_state(state)
|
||||
assert len(tool._state) == 0
|
||||
assert len(tool.state) == 0
|
||||
|
||||
|
||||
@pytest.mark.parametrize('use_data_coordinates', [False, True])
|
||||
|
|
|
|||
|
|
@ -2394,8 +2394,8 @@ class _SelectorWidget(AxesWidget):
|
|||
return
|
||||
for (state, modifier) in self._state_modifier_keys.items():
|
||||
if modifier in key.split('+'):
|
||||
# 'rotate' is changing _state on press and is not removed
|
||||
# from _state when releasing
|
||||
# 'rotate' is changing state on press and is not removed
|
||||
# from state when releasing
|
||||
if state == 'rotate':
|
||||
if state in self._state:
|
||||
self._state.discard(state)
|
||||
|
|
@ -2413,8 +2413,8 @@ class _SelectorWidget(AxesWidget):
|
|||
if self.active:
|
||||
key = event.key or ''
|
||||
for (state, modifier) in self._state_modifier_keys.items():
|
||||
# 'rotate' is changing _state on press and is not removed
|
||||
# from _state when releasing
|
||||
# 'rotate' is changing state on press and is not removed
|
||||
# from state when releasing
|
||||
if modifier in key.split('+') and state != 'rotate':
|
||||
self._state.discard(state)
|
||||
self._on_key_release(event)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user