8000 bug in combined key press · matplotlib/matplotlib@c08fe56 · GitHub
[go: up one dir, main page]

Skip to content

Commit c08fe56

Browse files
committed
bug in combined key press
1 parent 05db3b6 commit c08fe56

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/matplotlib/backend_bases.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3450,8 +3450,7 @@ def _get_cls_to_instantiate(self, callback_class):
34503450
def trigger_tool(self, name):
34513451
"""Trigger on a tool
34523452
3453-
This is a convenient method to programatically "click" on
3454-
Tools
3453+
Method to programatically "click" on Tools
34553454
"""
34563455
self._trigger_tool(name, None, False)
34573456

@@ -3475,6 +3474,8 @@ def _key_press(self, event):
34753474
return
34763475

34773476
name = self._keys.get(event.key, None)
3477+
if name is None:
3478+
return
34783479
self._trigger_tool(name, event, False)
34793480

34803481
def _get_instance(self, name):

0 commit comments

Comments
 (0)
0