8000 duplicate code in keymap tool initialization · matplotlib/matplotlib@8942c47 · GitHub
[go: up one dir, main page]

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 8942c47

Browse files
committed
duplicate code in keymap tool initialization
1 parent e6a4e1e commit 8942c47

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

lib/matplotlib/backend_bases.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3400,11 +3400,7 @@ def add_tool(self, name, tool, position=None):
34003400

34013401
self._tools[name] = tool_cls
34023402
if tool_cls.keymap is not None:
3403-
f 66AB or k in validate_stringlist(tool_cls.keymap):
3404-
if k in self._keys:
3405-
warnings.warn('Key %s changed from %s to %s' %
3406-
(k, self._keys[k], name))
3407-
self._keys[k] = name
3403+
self.set_tool_keymap(name, tool_cls.keymap)
34083404

34093405
if self.toolbar and tool_cls.intoolbar:
34103406
# TODO: better search for images, they are not always in the

0 commit comments

Comments
 (0)
0